home *** CD-ROM | disk | FTP | other *** search
/ Oh!X 2000 Spring / Oh!X 2000 Spring Special CD-ROM (Japan) (Part 2).7z / Oh!X 2000 Spring Special CD-ROM (Japan) (Part 2).bin / DXF / include / ddraw.h < prev    next >
C/C++ Source or Header  |  1999-09-08  |  235KB  |  5,556 lines

  1. /*==========================================================================;
  2.  *
  3.  *  Copyright (C) 1994-1997 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:       ddraw.h
  6.  *  Content:    DirectDraw include file
  7.  *
  8.  ***************************************************************************/
  9.  
  10. #ifndef __DDRAW_INCLUDED__
  11. #define __DDRAW_INCLUDED__
  12.  
  13. //Disable the nameless union warning
  14. #pragma warning(disable:4201)
  15.  
  16. /*
  17.  * If you wish an application built against the newest version of DirectDraw
  18.  * to run against an older DirectDraw run time then define DIRECTDRAW_VERSION
  19.  * to be the earlies version of DirectDraw you wish to run against. For,
  20.  * example if you wish an application to run against a DX 3 runtime define
  21.  * DIRECTDRAW_VERSION to be 0x0300.
  22.  */
  23. #ifndef   DIRECTDRAW_VERSION
  24. #define   DIRECTDRAW_VERSION 0x0700
  25. #endif /* DIRECTDRAW_VERSION */
  26.  
  27. #if defined( _WIN32 )  && !defined( _NO_COM )
  28. #define COM_NO_WINDOWS_H
  29. #include <objbase.h>
  30. #else
  31. #define IUnknown            void
  32. #if !defined( NT_BUILD_ENVIRONMENT ) && !defined(WINNT)
  33.         #define CO_E_NOTINITIALIZED 0x800401F0L
  34. #endif
  35. #endif
  36.  
  37. #define _FACDD  0x876
  38. #define MAKE_DDHRESULT( code )  MAKE_HRESULT( 1, _FACDD, code )
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. //
  45. // For compilers that don't support nameless unions, do a
  46. //
  47. // #define NONAMELESSUNION
  48. //
  49. // before #include <ddraw.h>
  50. //
  51. #ifndef DUMMYUNIONNAMEN
  52. #if defined(__cplusplus) || !defined(NONAMELESSUNION)
  53. #define DUMMYUNIONNAMEN(n)
  54. #else
  55. #define DUMMYUNIONNAMEN(n)      u##n
  56. #endif
  57. #endif
  58.  
  59. #ifndef MAKEFOURCC
  60.     #define MAKEFOURCC(ch0, ch1, ch2, ch3)                              \
  61.                 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) |   \
  62.                 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
  63. #endif //defined(MAKEFOURCC)
  64.  
  65. /*
  66.  * FOURCC codes for DX compressed-texture pixel formats
  67.  */
  68. #define FOURCC_DXT1  (MAKEFOURCC('D','X','T','1'))
  69. #define FOURCC_DXT2  (MAKEFOURCC('D','X','T','2'))
  70. #define FOURCC_DXT3  (MAKEFOURCC('D','X','T','3'))
  71. #define FOURCC_DXT4  (MAKEFOURCC('D','X','T','4'))
  72. #define FOURCC_DXT5  (MAKEFOURCC('D','X','T','5'))
  73.  
  74. /*
  75.  * GUIDS used by DirectDraw objects
  76.  */
  77. #if defined( _WIN32 ) && !defined( _NO_COM )
  78.  
  79. DEFINE_GUID( CLSID_DirectDraw,                  0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
  80. DEFINE_GUID( CLSID_DirectDraw7,                 0x3c305196,0x50db,0x11d3,0x9c,0xfe,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  81. DEFINE_GUID( CLSID_DirectDrawClipper,           0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
  82. DEFINE_GUID( IID_IDirectDraw,                   0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  83. DEFINE_GUID( IID_IDirectDraw2,                  0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  84. DEFINE_GUID( IID_IDirectDraw4,                  0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
  85. DEFINE_GUID( IID_IDirectDraw7,                  0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
  86. DEFINE_GUID( IID_IDirectDrawSurface,            0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  87. DEFINE_GUID( IID_IDirectDrawSurface2,           0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
  88. DEFINE_GUID( IID_IDirectDrawSurface3,           0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
  89. DEFINE_GUID( IID_IDirectDrawSurface4,           0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
  90. DEFINE_GUID( IID_IDirectDrawSurface7,           0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
  91.  
  92. DEFINE_GUID( IID_IDirectDrawPalette,            0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  93. DEFINE_GUID( IID_IDirectDrawClipper,            0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  94. DEFINE_GUID( IID_IDirectDrawColorControl,       0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
  95. DEFINE_GUID( IID_IDirectDrawGammaControl,       0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
  96.  
  97. #endif
  98.  
  99. /*============================================================================
  100.  *
  101.  * DirectDraw Structures
  102.  *
  103.  * Various structures used to invoke DirectDraw.
  104.  *
  105.  *==========================================================================*/
  106.  
  107. struct IDirectDraw;
  108. struct IDirectDrawSurface;
  109. struct IDirectDrawPalette;
  110. struct IDirectDrawClipper;
  111.  
  112. typedef struct IDirectDraw              FAR *LPDIRECTDRAW;
  113. typedef struct IDirectDraw2             FAR *LPDIRECTDRAW2;
  114. typedef struct IDirectDraw4             FAR *LPDIRECTDRAW4;
  115. typedef struct IDirectDraw7             FAR *LPDIRECTDRAW7;
  116. typedef struct IDirectDrawSurface       FAR *LPDIRECTDRAWSURFACE;
  117. typedef struct IDirectDrawSurface2      FAR *LPDIRECTDRAWSURFACE2;
  118. typedef struct IDirectDrawSurface3      FAR *LPDIRECTDRAWSURFACE3;
  119. typedef struct IDirectDrawSurface4      FAR *LPDIRECTDRAWSURFACE4;
  120. typedef struct IDirectDrawSurface7      FAR *LPDIRECTDRAWSURFACE7;
  121.  
  122. typedef struct IDirectDrawPalette               FAR *LPDIRECTDRAWPALETTE;
  123. typedef struct IDirectDrawClipper               FAR *LPDIRECTDRAWCLIPPER;
  124. typedef struct IDirectDrawColorControl          FAR *LPDIRECTDRAWCOLORCONTROL;
  125. typedef struct IDirectDrawGammaControl          FAR *LPDIRECTDRAWGAMMACONTROL;
  126.  
  127. typedef struct _DDFXROP                 FAR *LPDDFXROP;
  128. typedef struct _DDSURFACEDESC           FAR *LPDDSURFACEDESC;
  129. typedef struct _DDSURFACEDESC2          FAR *LPDDSURFACEDESC2;
  130. typedef struct _DDCOLORCONTROL          FAR *LPDDCOLORCONTROL;
  131.  
  132. /*
  133.  * API's
  134.  */
  135. #if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
  136. //#if defined( _WIN32 ) && !defined( _NO_ENUM )
  137.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
  138.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
  139.     extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
  140.     extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
  141.     /*
  142.      * Protect against old SDKs
  143.      */
  144.     #if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
  145.         #define HMONITOR_DECLARED
  146.         DECLARE_HANDLE(HMONITOR);
  147.     #endif
  148.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR);
  149.     typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
  150.     extern HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  151.     extern HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  152.     typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
  153.     typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
  154.  
  155.     #ifdef UNICODE
  156.         typedef LPDDENUMCALLBACKW           LPDDENUMCALLBACK;
  157.         #define DirectDrawEnumerate         DirectDrawEnumerateW
  158.         typedef LPDDENUMCALLBACKEXW         LPDDENUMCALLBACKEX;
  159.         typedef LPDIRECTDRAWENUMERATEEXW        LPDIRECTDRAWENUMERATEEX;
  160.         #define DirectDrawEnumerateEx       DirectDrawEnumerateExW
  161.     #else
  162.         typedef LPDDENUMCALLBACKA           LPDDENUMCALLBACK;
  163.         #define DirectDrawEnumerate         DirectDrawEnumerateA
  164.         typedef LPDDENUMCALLBACKEXA         LPDDENUMCALLBACKEX;
  165.         typedef LPDIRECTDRAWENUMERATEEXA        LPDIRECTDRAWENUMERATEEX;
  166.         #define DirectDrawEnumerateEx       DirectDrawEnumerateExA
  167.     #endif
  168.     extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
  169.     extern HRESULT WINAPI DirectDrawCreateEx( GUID FAR * lpGuid, LPVOID  *lplpDD, REFIID  iid,IUnknown FAR *pUnkOuter );
  170.     extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
  171. #endif
  172. /*
  173.  * Flags for DirectDrawEnumerateEx
  174.  * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to
  175.  * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx.
  176.  * By default, only the primary display device is enumerated.
  177.  * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES)
  178.  */
  179.  
  180. /*
  181.  * This flag causes enumeration of any GDI display devices which are part of
  182.  * the Windows Desktop
  183.  */
  184. #define DDENUM_ATTACHEDSECONDARYDEVICES     0x00000001L
  185.  
  186. /*
  187.  * This flag causes enumeration of any GDI display devices which are not
  188.  * part of the Windows Desktop
  189.  */
  190. #define DDENUM_DETACHEDSECONDARYDEVICES     0x00000002L
  191.  
  192. /*
  193.  * This flag causes enumeration of non-display devices
  194.  */
  195. #define DDENUM_NONDISPLAYDEVICES            0x00000004L
  196.  
  197.  
  198. #define REGSTR_KEY_DDHW_DESCRIPTION     "Description"
  199. #define REGSTR_KEY_DDHW_DRIVERNAME      "DriverName"
  200. #define REGSTR_PATH_DDHW                "Hardware\\DirectDrawDrivers"
  201.  
  202. #define DDCREATE_HARDWAREONLY           0x00000001l
  203. #define DDCREATE_EMULATIONONLY          0x00000002l
  204.  
  205. #if defined(WINNT) || !defined(WIN32)
  206. typedef long HRESULT;
  207. #endif
  208.  
  209. //#ifndef WINNT
  210. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
  211. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
  212. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
  213. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
  214. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID);
  215. //#endif
  216.  
  217. /*
  218.  * Generic pixel format with 8-bit RGB and alpha components
  219.  */
  220. typedef struct _DDARGB
  221. {
  222.     BYTE blue;
  223.     BYTE green;
  224.     BYTE red;
  225.     BYTE alpha;
  226. } DDARGB;
  227.  
  228. typedef DDARGB FAR *LPDDARGB;
  229.  
  230. /*
  231.  * This version of the structure remains for backwards source compatibility.
  232.  * The DDARGB structure is the one that should be used for all DirectDraw APIs.
  233.  */
  234. typedef struct _DDRGBA
  235. {
  236.     BYTE red;
  237.     BYTE green;
  238.     BYTE blue;
  239.     BYTE alpha;
  240. } DDRGBA;
  241.  
  242. typedef DDRGBA FAR *LPDDRGBA;
  243.  
  244.  
  245. /*
  246.  * DDCOLORKEY
  247.  */
  248. typedef struct _DDCOLORKEY
  249. {
  250.     DWORD       dwColorSpaceLowValue;   // low boundary of color space that is to
  251.                                         // be treated as Color Key, inclusive
  252.     DWORD       dwColorSpaceHighValue;  // high boundary of color space that is
  253.                                         // to be treated as Color Key, inclusive
  254. } DDCOLORKEY;
  255.  
  256. typedef DDCOLORKEY FAR* LPDDCOLORKEY;
  257.  
  258. /*
  259.  * DDBLTFX
  260.  * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
  261.  */
  262. typedef struct _DDBLTFX
  263. {
  264.     DWORD       dwSize;                         // size of structure
  265.     DWORD       dwDDFX;                         // FX operations
  266.     DWORD       dwROP;                          // Win32 raster operations
  267.     DWORD       dwDDROP;                        // Raster operations new for DirectDraw
  268.     DWORD       dwRotationAngle;                // Rotation angle for blt
  269.     DWORD       dwZBufferOpCode;                // ZBuffer compares
  270.     DWORD       dwZBufferLow;                   // Low limit of Z buffer
  271.     DWORD       dwZBufferHigh;                  // High limit of Z buffer
  272.     DWORD       dwZBufferBaseDest;              // Destination base value
  273.     DWORD       dwZDestConstBitDepth;           // Bit depth used to specify Z constant for destination
  274.     union
  275.     {
  276.         DWORD   dwZDestConst;                   // Constant to use as Z buffer for dest
  277.         LPDIRECTDRAWSURFACE lpDDSZBufferDest;   // Surface to use as Z buffer for dest
  278.     } DUMMYUNIONNAMEN(1);
  279.     DWORD       dwZSrcConstBitDepth;            // Bit depth used to specify Z constant for source
  280.     union
  281.     {
  282.         DWORD   dwZSrcConst;                    // Constant to use as Z buffer for src
  283.         LPDIRECTDRAWSURFACE lpDDSZBufferSrc;    // Surface to use as Z buffer for src
  284.     } DUMMYUNIONNAMEN(2);
  285.     DWORD       dwAlphaEdgeBlendBitDepth;       // Bit depth used to specify constant for alpha edge blend
  286.     DWORD       dwAlphaEdgeBlend;               // Alpha for edge blending
  287.     DWORD       dwReserved;
  288.     DWORD       dwAlphaDestConstBitDepth;       // Bit depth used to specify alpha constant for destination
  289.     union
  290.     {
  291.         DWORD   dwAlphaDestConst;               // Constant to use as Alpha Channel
  292.         LPDIRECTDRAWSURFACE lpDDSAlphaDest;     // Surface to use as Alpha Channel
  293.     } DUMMYUNIONNAMEN(3);
  294.     DWORD       dwAlphaSrcConstBitDepth;        // Bit depth used to specify alpha constant for source
  295.     union
  296.     {
  297.         DWORD   dwAlphaSrcConst;                // Constant to use as Alpha Channel
  298.         LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      // Surface to use as Alpha Channel
  299.     } DUMMYUNIONNAMEN(4);
  300.     union
  301.     {
  302.         DWORD   dwFillColor;                    // color in RGB or Palettized
  303.         DWORD   dwFillDepth;                    // depth value for z-buffer
  304.         DWORD   dwFillPixel;                    // pixel value for RGBA or RGBZ
  305.         LPDIRECTDRAWSURFACE lpDDSPattern;       // Surface to use as pattern
  306.     } DUMMYUNIONNAMEN(5);
  307.     DDCOLORKEY  ddckDestColorkey;               // DestColorkey override
  308.     DDCOLORKEY  ddckSrcColorkey;                // SrcColorkey override
  309. } DDBLTFX;
  310.  
  311. typedef DDBLTFX FAR* LPDDBLTFX;
  312.  
  313.  
  314.  
  315. /*
  316.  * DDSCAPS
  317.  */
  318. typedef struct _DDSCAPS
  319. {
  320.     DWORD       dwCaps;         // capabilities of surface wanted
  321. } DDSCAPS;
  322.  
  323. typedef DDSCAPS FAR* LPDDSCAPS;
  324.  
  325.  
  326. /*
  327.  * DDOSCAPS
  328.  */
  329. typedef struct _DDOSCAPS
  330. {
  331.     DWORD       dwCaps;         // capabilities of surface wanted
  332. } DDOSCAPS;
  333.  
  334. typedef DDOSCAPS FAR* LPDDOSCAPS;
  335.  
  336. /*
  337.  * This structure is used internally by DirectDraw.
  338.  */
  339. typedef struct _DDSCAPSEX
  340. {
  341.     DWORD       dwCaps2;
  342.     DWORD       dwCaps3;
  343.     DWORD       dwCaps4;
  344. } DDSCAPSEX, FAR * LPDDSCAPSEX;
  345.  
  346. /*
  347.  * DDSCAPS2
  348.  */
  349. typedef struct _DDSCAPS2
  350. {
  351.     DWORD       dwCaps;         // capabilities of surface wanted
  352.     DWORD       dwCaps2;
  353.     DWORD       dwCaps3;
  354.     DWORD       dwCaps4;
  355. } DDSCAPS2;
  356.  
  357. typedef DDSCAPS2 FAR* LPDDSCAPS2;
  358.  
  359. /*
  360.  * DDCAPS
  361.  */
  362. #define DD_ROP_SPACE            (256/32)        // space required to store ROP array
  363. /*
  364.  * NOTE: Our choosen structure number scheme is to append a single digit to
  365.  * the end of the structure giving the version that structure is associated
  366.  * with.
  367.  */
  368.  
  369. /*
  370.  * This structure represents the DDCAPS structure released in DirectDraw 1.0.  It is used internally
  371.  * by DirectDraw to interpret caps passed into ddraw by drivers written prior to the release of DirectDraw 2.0.
  372.  * New applications should use the DDCAPS structure defined below.
  373.  */
  374. typedef struct _DDCAPS_DX1
  375. {
  376.     DWORD       dwSize;                 // size of the DDDRIVERCAPS structure
  377.     DWORD       dwCaps;                 // driver specific capabilities
  378.     DWORD       dwCaps2;                // more driver specific capabilites
  379.     DWORD       dwCKeyCaps;             // color key capabilities of the surface
  380.     DWORD       dwFXCaps;               // driver specific stretching and effects capabilites
  381.     DWORD       dwFXAlphaCaps;          // alpha driver specific capabilities
  382.     DWORD       dwPalCaps;              // palette capabilities
  383.     DWORD       dwSVCaps;               // stereo vision capabilities
  384.     DWORD       dwAlphaBltConstBitDepths;       // DDBD_2,4,8
  385.     DWORD       dwAlphaBltPixelBitDepths;       // DDBD_1,2,4,8
  386.     DWORD       dwAlphaBltSurfaceBitDepths;     // DDBD_1,2,4,8
  387.     DWORD       dwAlphaOverlayConstBitDepths;   // DDBD_2,4,8
  388.     DWORD       dwAlphaOverlayPixelBitDepths;   // DDBD_1,2,4,8
  389.     DWORD       dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  390.     DWORD       dwZBufferBitDepths;             // DDBD_8,16,24,32
  391.     DWORD       dwVidMemTotal;          // total amount of video memory
  392.     DWORD       dwVidMemFree;           // amount of free video memory
  393.     DWORD       dwMaxVisibleOverlays;   // maximum number of visible overlays
  394.     DWORD       dwCurrVisibleOverlays;  // current number of visible overlays
  395.     DWORD       dwNumFourCCCodes;       // number of four cc codes
  396.     DWORD       dwAlignBoundarySrc;     // source rectangle alignment
  397.     DWORD       dwAlignSizeSrc;         // source rectangle byte size
  398.     DWORD       dwAlignBoundaryDest;    // dest rectangle alignment
  399.     DWORD       dwAlignSizeDest;        // dest rectangle byte size
  400.     DWORD       dwAlignStrideAlign;     // stride alignment
  401.     DWORD       dwRops[DD_ROP_SPACE];   // ROPS supported
  402.     DDSCAPS     ddsCaps;                // DDSCAPS structure has all the general capabilities
  403.     DWORD       dwMinOverlayStretch;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  404.     DWORD       dwMaxOverlayStretch;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  405.     DWORD       dwMinLiveVideoStretch;  // OBSOLETE! This field remains for compatability reasons only
  406.     DWORD       dwMaxLiveVideoStretch;  // OBSOLETE! This field remains for compatability reasons only
  407.     DWORD       dwMinHwCodecStretch;    // OBSOLETE! This field remains for compatability reasons only
  408.     DWORD       dwMaxHwCodecStretch;    // OBSOLETE! This field remains for compatability reasons only
  409.     DWORD       dwReserved1;            // reserved
  410.     DWORD       dwReserved2;            // reserved
  411.     DWORD       dwReserved3;            // reserved
  412. } DDCAPS_DX1;
  413.  
  414. typedef DDCAPS_DX1 FAR* LPDDCAPS_DX1;
  415.  
  416. /*
  417.  * This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X.
  418.  * It is present for back compatability.
  419.  */
  420. typedef struct _DDCAPS_DX3
  421. {
  422.     DWORD       dwSize;                 // size of the DDDRIVERCAPS structure
  423.     DWORD       dwCaps;                 // driver specific capabilities
  424.     DWORD       dwCaps2;                // more driver specific capabilites
  425.     DWORD       dwCKeyCaps;             // color key capabilities of the surface
  426.     DWORD       dwFXCaps;               // driver specific stretching and effects capabilites
  427.     DWORD       dwFXAlphaCaps;          // alpha driver specific capabilities
  428.     DWORD       dwPalCaps;              // palette capabilities
  429.     DWORD       dwSVCaps;               // stereo vision capabilities
  430.     DWORD       dwAlphaBltConstBitDepths;       // DDBD_2,4,8
  431.     DWORD       dwAlphaBltPixelBitDepths;       // DDBD_1,2,4,8
  432.     DWORD       dwAlphaBltSurfaceBitDepths;     // DDBD_1,2,4,8
  433.     DWORD       dwAlphaOverlayConstBitDepths;   // DDBD_2,4,8
  434.     DWORD       dwAlphaOverlayPixelBitDepths;   // DDBD_1,2,4,8
  435.     DWORD       dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  436.     DWORD       dwZBufferBitDepths;             // DDBD_8,16,24,32
  437.     DWORD       dwVidMemTotal;          // total amount of video memory
  438.     DWORD       dwVidMemFree;           // amount of free video memory
  439.     DWORD       dwMaxVisibleOverlays;   // maximum number of visible overlays
  440.     DWORD       dwCurrVisibleOverlays;  // current number of visible overlays
  441.     DWORD       dwNumFourCCCodes;       // number of four cc codes
  442.     DWORD       dwAlignBoundarySrc;     // source rectangle alignment
  443.     DWORD       dwAlignSizeSrc;         // source rectangle byte size
  444.     DWORD       dwAlignBoundaryDest;    // dest rectangle alignment
  445.     DWORD       dwAlignSizeDest;        // dest rectangle byte size
  446.     DWORD       dwAlignStrideAlign;     // stride alignment
  447.     DWORD       dwRops[DD_ROP_SPACE];   // ROPS supported
  448.     DDSCAPS     ddsCaps;                // DDSCAPS structure has all the general capabilities
  449.     DWORD       dwMinOverlayStretch;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  450.     DWORD       dwMaxOverlayStretch;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  451.     DWORD       dwMinLiveVideoStretch;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  452.     DWORD       dwMaxLiveVideoStretch;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  453.     DWORD       dwMinHwCodecStretch;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  454.     DWORD       dwMaxHwCodecStretch;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  455.     DWORD       dwReserved1;            // reserved
  456.     DWORD       dwReserved2;            // reserved
  457.     DWORD       dwReserved3;            // reserved
  458.     DWORD       dwSVBCaps;              // driver specific capabilities for System->Vmem blts
  459.     DWORD       dwSVBCKeyCaps;          // driver color key capabilities for System->Vmem blts
  460.     DWORD       dwSVBFXCaps;            // driver FX capabilities for System->Vmem blts
  461.     DWORD       dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  462.     DWORD       dwVSBCaps;              // driver specific capabilities for Vmem->System blts
  463.     DWORD       dwVSBCKeyCaps;          // driver color key capabilities for Vmem->System blts
  464.     DWORD       dwVSBFXCaps;            // driver FX capabilities for Vmem->System blts
  465.     DWORD       dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  466.     DWORD       dwSSBCaps;              // driver specific capabilities for System->System blts
  467.     DWORD       dwSSBCKeyCaps;          // driver color key capabilities for System->System blts
  468.     DWORD       dwSSBFXCaps;            // driver FX capabilities for System->System blts
  469.     DWORD       dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  470.     DWORD       dwReserved4;            // reserved
  471.     DWORD       dwReserved5;            // reserved
  472.     DWORD       dwReserved6;            // reserved
  473. } DDCAPS_DX3;
  474. typedef DDCAPS_DX3 FAR* LPDDCAPS_DX3;
  475.  
  476. /*
  477.  * This structure is the DDCAPS structure as it was in version 5 of Direct X.
  478.  * It is present for back compatability.
  479.  */
  480. typedef struct _DDCAPS_DX5
  481. {
  482. /*  0*/ DWORD   dwSize;                 // size of the DDDRIVERCAPS structure
  483. /*  4*/ DWORD   dwCaps;                 // driver specific capabilities
  484. /*  8*/ DWORD   dwCaps2;                // more driver specific capabilites
  485. /*  c*/ DWORD   dwCKeyCaps;             // color key capabilities of the surface
  486. /* 10*/ DWORD   dwFXCaps;               // driver specific stretching and effects capabilites
  487. /* 14*/ DWORD   dwFXAlphaCaps;          // alpha driver specific capabilities
  488. /* 18*/ DWORD   dwPalCaps;              // palette capabilities
  489. /* 1c*/ DWORD   dwSVCaps;               // stereo vision capabilities
  490. /* 20*/ DWORD   dwAlphaBltConstBitDepths;       // DDBD_2,4,8
  491. /* 24*/ DWORD   dwAlphaBltPixelBitDepths;       // DDBD_1,2,4,8
  492. /* 28*/ DWORD   dwAlphaBltSurfaceBitDepths;     // DDBD_1,2,4,8
  493. /* 2c*/ DWORD   dwAlphaOverlayConstBitDepths;   // DDBD_2,4,8
  494. /* 30*/ DWORD   dwAlphaOverlayPixelBitDepths;   // DDBD_1,2,4,8
  495. /* 34*/ DWORD   dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  496. /* 38*/ DWORD   dwZBufferBitDepths;             // DDBD_8,16,24,32
  497. /* 3c*/ DWORD   dwVidMemTotal;          // total amount of video memory
  498. /* 40*/ DWORD   dwVidMemFree;           // amount of free video memory
  499. /* 44*/ DWORD   dwMaxVisibleOverlays;   // maximum number of visible overlays
  500. /* 48*/ DWORD   dwCurrVisibleOverlays;  // current number of visible overlays
  501. /* 4c*/ DWORD   dwNumFourCCCodes;       // number of four cc codes
  502. /* 50*/ DWORD   dwAlignBoundarySrc;     // source rectangle alignment
  503. /* 54*/ DWORD   dwAlignSizeSrc;         // source rectangle byte size
  504. /* 58*/ DWORD   dwAlignBoundaryDest;    // dest rectangle alignment
  505. /* 5c*/ DWORD   dwAlignSizeDest;        // dest rectangle byte size
  506. /* 60*/ DWORD   dwAlignStrideAlign;     // stride alignment
  507. /* 64*/ DWORD   dwRops[DD_ROP_SPACE];   // ROPS supported
  508. /* 84*/ DDSCAPS ddsCaps;                // DDSCAPS structure has all the general capabilities
  509. /* 88*/ DWORD   dwMinOverlayStretch;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  510. /* 8c*/ DWORD   dwMaxOverlayStretch;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  511. /* 90*/ DWORD   dwMinLiveVideoStretch;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  512. /* 94*/ DWORD   dwMaxLiveVideoStretch;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  513. /* 98*/ DWORD   dwMinHwCodecStretch;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  514. /* 9c*/ DWORD   dwMaxHwCodecStretch;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  515. /* a0*/ DWORD   dwReserved1;            // reserved
  516. /* a4*/ DWORD   dwReserved2;            // reserved
  517. /* a8*/ DWORD   dwReserved3;            // reserved
  518. /* ac*/ DWORD   dwSVBCaps;              // driver specific capabilities for System->Vmem blts
  519. /* b0*/ DWORD   dwSVBCKeyCaps;          // driver color key capabilities for System->Vmem blts
  520. /* b4*/ DWORD   dwSVBFXCaps;            // driver FX capabilities for System->Vmem blts
  521. /* b8*/ DWORD   dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  522. /* d8*/ DWORD   dwVSBCaps;              // driver specific capabilities for Vmem->System blts
  523. /* dc*/ DWORD   dwVSBCKeyCaps;          // driver color key capabilities for Vmem->System blts
  524. /* e0*/ DWORD   dwVSBFXCaps;            // driver FX capabilities for Vmem->System blts
  525. /* e4*/ DWORD   dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  526. /*104*/ DWORD   dwSSBCaps;              // driver specific capabilities for System->System blts
  527. /*108*/ DWORD   dwSSBCKeyCaps;          // driver color key capabilities for System->System blts
  528. /*10c*/ DWORD   dwSSBFXCaps;            // driver FX capabilities for System->System blts
  529. /*110*/ DWORD   dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  530. // Members added for DX5:
  531. /*130*/ DWORD   dwMaxVideoPorts;        // maximum number of usable video ports
  532. /*134*/ DWORD   dwCurrVideoPorts;       // current number of video ports used
  533. /*138*/ DWORD   dwSVBCaps2;             // more driver specific capabilities for System->Vmem blts
  534. /*13c*/ DWORD   dwNLVBCaps;               // driver specific capabilities for non-local->local vidmem blts
  535. /*140*/ DWORD   dwNLVBCaps2;              // more driver specific capabilities non-local->local vidmem blts
  536. /*144*/ DWORD   dwNLVBCKeyCaps;           // driver color key capabilities for non-local->local vidmem blts
  537. /*148*/ DWORD   dwNLVBFXCaps;             // driver FX capabilities for non-local->local blts
  538. /*14c*/ DWORD   dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
  539. } DDCAPS_DX5;
  540. typedef DDCAPS_DX5 FAR* LPDDCAPS_DX5;
  541.  
  542. typedef struct _DDCAPS_DX6
  543. {
  544. /*  0*/ DWORD   dwSize;                 // size of the DDDRIVERCAPS structure
  545. /*  4*/ DWORD   dwCaps;                 // driver specific capabilities
  546. /*  8*/ DWORD   dwCaps2;                // more driver specific capabilites
  547. /*  c*/ DWORD   dwCKeyCaps;             // color key capabilities of the surface
  548. /* 10*/ DWORD   dwFXCaps;               // driver specific stretching and effects capabilites
  549. /* 14*/ DWORD   dwFXAlphaCaps;          // alpha caps
  550. /* 18*/ DWORD   dwPalCaps;              // palette capabilities
  551. /* 1c*/ DWORD   dwSVCaps;               // stereo vision capabilities
  552. /* 20*/ DWORD   dwAlphaBltConstBitDepths;       // DDBD_2,4,8
  553. /* 24*/ DWORD   dwAlphaBltPixelBitDepths;       // DDBD_1,2,4,8
  554. /* 28*/ DWORD   dwAlphaBltSurfaceBitDepths;     // DDBD_1,2,4,8
  555. /* 2c*/ DWORD   dwAlphaOverlayConstBitDepths;   // DDBD_2,4,8
  556. /* 30*/ DWORD   dwAlphaOverlayPixelBitDepths;   // DDBD_1,2,4,8
  557. /* 34*/ DWORD   dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  558. /* 38*/ DWORD   dwZBufferBitDepths;             // DDBD_8,16,24,32
  559. /* 3c*/ DWORD   dwVidMemTotal;          // total amount of video memory
  560. /* 40*/ DWORD   dwVidMemFree;           // amount of free video memory
  561. /* 44*/ DWORD   dwMaxVisibleOverlays;   // maximum number of visible overlays
  562. /* 48*/ DWORD   dwCurrVisibleOverlays;  // current number of visible overlays
  563. /* 4c*/ DWORD   dwNumFourCCCodes;       // number of four cc codes
  564. /* 50*/ DWORD   dwAlignBoundarySrc;     // source rectangle alignment
  565. /* 54*/ DWORD   dwAlignSizeSrc;         // source rectangle byte size
  566. /* 58*/ DWORD   dwAlignBoundaryDest;    // dest rectangle alignment
  567. /* 5c*/ DWORD   dwAlignSizeDest;        // dest rectangle byte size
  568. /* 60*/ DWORD   dwAlignStrideAlign;     // stride alignment
  569. /* 64*/ DWORD   dwRops[DD_ROP_SPACE];   // ROPS supported
  570. /* 84*/ DDSCAPS ddsOldCaps;             // Was DDSCAPS  ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
  571. /* 88*/ DWORD   dwMinOverlayStretch;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  572. /* 8c*/ DWORD   dwMaxOverlayStretch;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  573. /* 90*/ DWORD   dwMinLiveVideoStretch;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  574. /* 94*/ DWORD   dwMaxLiveVideoStretch;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  575. /* 98*/ DWORD   dwMinHwCodecStretch;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  576. /* 9c*/ DWORD   dwMaxHwCodecStretch;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  577. /* a0*/ DWORD   dwReserved1;            // reserved
  578. /* a4*/ DWORD   dwReserved2;            // reserved
  579. /* a8*/ DWORD   dwReserved3;            // reserved
  580. /* ac*/ DWORD   dwSVBCaps;              // driver specific capabilities for System->Vmem blts
  581. /* b0*/ DWORD   dwSVBCKeyCaps;          // driver color key capabilities for System->Vmem blts
  582. /* b4*/ DWORD   dwSVBFXCaps;            // driver FX capabilities for System->Vmem blts
  583. /* b8*/ DWORD   dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  584. /* d8*/ DWORD   dwVSBCaps;              // driver specific capabilities for Vmem->System blts
  585. /* dc*/ DWORD   dwVSBCKeyCaps;          // driver color key capabilities for Vmem->System blts
  586. /* e0*/ DWORD   dwVSBFXCaps;            // driver FX capabilities for Vmem->System blts
  587. /* e4*/ DWORD   dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  588. /*104*/ DWORD   dwSSBCaps;              // driver specific capabilities for System->System blts
  589. /*108*/ DWORD   dwSSBCKeyCaps;          // driver color key capabilities for System->System blts
  590. /*10c*/ DWORD   dwSSBFXCaps;            // driver FX capabilities for System->System blts
  591. /*110*/ DWORD   dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  592. /*130*/ DWORD   dwMaxVideoPorts;        // maximum number of usable video ports
  593. /*134*/ DWORD   dwCurrVideoPorts;       // current number of video ports used
  594. /*138*/ DWORD   dwSVBCaps2;             // more driver specific capabilities for System->Vmem blts
  595. /*13c*/ DWORD   dwNLVBCaps;               // driver specific capabilities for non-local->local vidmem blts
  596. /*140*/ DWORD   dwNLVBCaps2;              // more driver specific capabilities non-local->local vidmem blts
  597. /*144*/ DWORD   dwNLVBCKeyCaps;           // driver color key capabilities for non-local->local vidmem blts
  598. /*148*/ DWORD   dwNLVBFXCaps;             // driver FX capabilities for non-local->local blts
  599. /*14c*/ DWORD   dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
  600. // Members added for DX6 release
  601. /*16c*/ DDSCAPS2 ddsCaps;               // Surface Caps
  602. } DDCAPS_DX6;
  603. typedef DDCAPS_DX6 FAR* LPDDCAPS_DX6;
  604.  
  605. typedef struct _DDCAPS_DX7
  606. {
  607. /*  0*/ DWORD   dwSize;                 // size of the DDDRIVERCAPS structure
  608. /*  4*/ DWORD   dwCaps;                 // driver specific capabilities
  609. /*  8*/ DWORD   dwCaps2;                // more driver specific capabilites
  610. /*  c*/ DWORD   dwCKeyCaps;             // color key capabilities of the surface
  611. /* 10*/ DWORD   dwFXCaps;               // driver specific stretching and effects capabilites
  612. /* 14*/ DWORD   dwFXAlphaCaps;          // alpha driver specific capabilities
  613. /* 18*/ DWORD   dwPalCaps;              // palette capabilities
  614. /* 1c*/ DWORD   dwSVCaps;               // stereo vision capabilities
  615. /* 20*/ DWORD   dwAlphaBltConstBitDepths;       // DDBD_2,4,8
  616. /* 24*/ DWORD   dwAlphaBltPixelBitDepths;       // DDBD_1,2,4,8
  617. /* 28*/ DWORD   dwAlphaBltSurfaceBitDepths;     // DDBD_1,2,4,8
  618. /* 2c*/ DWORD   dwAlphaOverlayConstBitDepths;   // DDBD_2,4,8
  619. /* 30*/ DWORD   dwAlphaOverlayPixelBitDepths;   // DDBD_1,2,4,8
  620. /* 34*/ DWORD   dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  621. /* 38*/ DWORD   dwZBufferBitDepths;             // DDBD_8,16,24,32
  622. /* 3c*/ DWORD   dwVidMemTotal;          // total amount of video memory
  623. /* 40*/ DWORD   dwVidMemFree;           // amount of free video memory
  624. /* 44*/ DWORD   dwMaxVisibleOverlays;   // maximum number of visible overlays
  625. /* 48*/ DWORD   dwCurrVisibleOverlays;  // current number of visible overlays
  626. /* 4c*/ DWORD   dwNumFourCCCodes;       // number of four cc codes
  627. /* 50*/ DWORD   dwAlignBoundarySrc;     // source rectangle alignment
  628. /* 54*/ DWORD   dwAlignSizeSrc;         // source rectangle byte size
  629. /* 58*/ DWORD   dwAlignBoundaryDest;    // dest rectangle alignment
  630. /* 5c*/ DWORD   dwAlignSizeDest;        // dest rectangle byte size
  631. /* 60*/ DWORD   dwAlignStrideAlign;     // stride alignment
  632. /* 64*/ DWORD   dwRops[DD_ROP_SPACE];   // ROPS supported
  633. /* 84*/ DDSCAPS ddsOldCaps;             // Was DDSCAPS  ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
  634. /* 88*/ DWORD   dwMinOverlayStretch;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  635. /* 8c*/ DWORD   dwMaxOverlayStretch;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  636. /* 90*/ DWORD   dwMinLiveVideoStretch;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  637. /* 94*/ DWORD   dwMaxLiveVideoStretch;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  638. /* 98*/ DWORD   dwMinHwCodecStretch;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  639. /* 9c*/ DWORD   dwMaxHwCodecStretch;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  640. /* a0*/ DWORD   dwReserved1;            // reserved
  641. /* a4*/ DWORD   dwReserved2;            // reserved
  642. /* a8*/ DWORD   dwReserved3;            // reserved
  643. /* ac*/ DWORD   dwSVBCaps;              // driver specific capabilities for System->Vmem blts
  644. /* b0*/ DWORD   dwSVBCKeyCaps;          // driver color key capabilities for System->Vmem blts
  645. /* b4*/ DWORD   dwSVBFXCaps;            // driver FX capabilities for System->Vmem blts
  646. /* b8*/ DWORD   dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
  647. /* d8*/ DWORD   dwVSBCaps;              // driver specific capabilities for Vmem->System blts
  648. /* dc*/ DWORD   dwVSBCKeyCaps;          // driver color key capabilities for Vmem->System blts
  649. /* e0*/ DWORD   dwVSBFXCaps;            // driver FX capabilities for Vmem->System blts
  650. /* e4*/ DWORD   dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
  651. /*104*/ DWORD   dwSSBCaps;              // driver specific capabilities for System->System blts
  652. /*108*/ DWORD   dwSSBCKeyCaps;          // driver color key capabilities for System->System blts
  653. /*10c*/ DWORD   dwSSBFXCaps;            // driver FX capabilities for System->System blts
  654. /*110*/ DWORD   dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
  655. /*130*/ DWORD   dwMaxVideoPorts;        // maximum number of usable video ports
  656. /*134*/ DWORD   dwCurrVideoPorts;       // current number of video ports used
  657. /*138*/ DWORD   dwSVBCaps2;             // more driver specific capabilities for System->Vmem blts
  658. /*13c*/ DWORD   dwNLVBCaps;               // driver specific capabilities for non-local->local vidmem blts
  659. /*140*/ DWORD   dwNLVBCaps2;              // more driver specific capabilities non-local->local vidmem blts
  660. /*144*/ DWORD   dwNLVBCKeyCaps;           // driver color key capabilities for non-local->local vidmem blts
  661. /*148*/ DWORD   dwNLVBFXCaps;             // driver FX capabilities for non-local->local blts
  662. /*14c*/ DWORD   dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
  663. // Members added for DX6 release
  664. /*16c*/ DDSCAPS2 ddsCaps;               // Surface Caps
  665. } DDCAPS_DX7;
  666. typedef DDCAPS_DX7 FAR* LPDDCAPS_DX7;
  667.  
  668.  
  669. #if DIRECTDRAW_VERSION <= 0x300
  670.     typedef DDCAPS_DX3 DDCAPS;
  671. #elif DIRECTDRAW_VERSION <= 0x500
  672.     typedef DDCAPS_DX5 DDCAPS;
  673. #elif DIRECTDRAW_VERSION <= 0x600
  674.     typedef DDCAPS_DX6 DDCAPS;
  675. #else
  676.     typedef DDCAPS_DX7 DDCAPS;
  677. #endif
  678.  
  679. typedef DDCAPS FAR* LPDDCAPS;
  680.  
  681.  
  682.  
  683. /*
  684.  * DDPIXELFORMAT
  685.  */
  686. typedef struct _DDPIXELFORMAT
  687. {
  688.     DWORD       dwSize;                 // size of structure
  689.     DWORD       dwFlags;                // pixel format flags
  690.     DWORD       dwFourCC;               // (FOURCC code)
  691.     union
  692.     {
  693.         DWORD   dwRGBBitCount;          // how many bits per pixel
  694.         DWORD   dwYUVBitCount;          // how many bits per pixel
  695.         DWORD   dwZBufferBitDepth;      // how many total bits/pixel in z buffer (including any stencil bits)
  696.         DWORD   dwAlphaBitDepth;        // how many bits for alpha channels
  697.         DWORD   dwLuminanceBitCount;    // how many bits per pixel
  698.         DWORD   dwBumpBitCount;         // how many bits per "buxel", total
  699.     } DUMMYUNIONNAMEN(1);
  700.     union
  701.     {
  702.         DWORD   dwRBitMask;             // mask for red bit
  703.         DWORD   dwYBitMask;             // mask for Y bits
  704.         DWORD   dwStencilBitDepth;      // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
  705.         DWORD   dwLuminanceBitMask;     // mask for luminance bits
  706.         DWORD   dwBumpDuBitMask;        // mask for bump map U delta bits
  707.     } DUMMYUNIONNAMEN(2);
  708.     union
  709.     {
  710.         DWORD   dwGBitMask;             // mask for green bits
  711.         DWORD   dwUBitMask;             // mask for U bits
  712.         DWORD   dwZBitMask;             // mask for Z bits
  713.         DWORD   dwBumpDvBitMask;        // mask for bump map V delta bits
  714.     } DUMMYUNIONNAMEN(3);
  715.     union
  716.     {
  717.         DWORD   dwBBitMask;             // mask for blue bits
  718.         DWORD   dwVBitMask;             // mask for V bits
  719.         DWORD   dwStencilBitMask;       // mask for stencil bits
  720.         DWORD   dwBumpLuminanceBitMask; // mask for luminance in bump map
  721.     } DUMMYUNIONNAMEN(4);
  722.     union
  723.     {
  724.         DWORD   dwRGBAlphaBitMask;      // mask for alpha channel
  725.         DWORD   dwYUVAlphaBitMask;      // mask for alpha channel
  726.         DWORD   dwLuminanceAlphaBitMask;// mask for alpha channel
  727.         DWORD   dwRGBZBitMask;          // mask for Z channel
  728.         DWORD   dwYUVZBitMask;          // mask for Z channel
  729.     } DUMMYUNIONNAMEN(5);
  730. } DDPIXELFORMAT;
  731.  
  732. typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
  733.  
  734. /*
  735.  * DDOVERLAYFX
  736.  */
  737. typedef struct _DDOVERLAYFX
  738. {
  739.     DWORD       dwSize;                         // size of structure
  740.     DWORD       dwAlphaEdgeBlendBitDepth;       // Bit depth used to specify constant for alpha edge blend
  741.     DWORD       dwAlphaEdgeBlend;               // Constant to use as alpha for edge blend
  742.     DWORD       dwReserved;
  743.     DWORD       dwAlphaDestConstBitDepth;       // Bit depth used to specify alpha constant for destination
  744.     union
  745.     {
  746.         DWORD   dwAlphaDestConst;               // Constant to use as alpha channel for dest
  747.         LPDIRECTDRAWSURFACE lpDDSAlphaDest;     // Surface to use as alpha channel for dest
  748.     } DUMMYUNIONNAMEN(1);
  749.     DWORD       dwAlphaSrcConstBitDepth;        // Bit depth used to specify alpha constant for source
  750.     union
  751.     {
  752.         DWORD   dwAlphaSrcConst;                // Constant to use as alpha channel for src
  753.         LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      // Surface to use as alpha channel for src
  754.     } DUMMYUNIONNAMEN(2);
  755.     DDCOLORKEY  dckDestColorkey;                // DestColorkey override
  756.     DDCOLORKEY  dckSrcColorkey;                 // DestColorkey override
  757.     DWORD       dwDDFX;                         // Overlay FX
  758.     DWORD       dwFlags;                        // flags
  759. } DDOVERLAYFX;
  760.  
  761. typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
  762.  
  763.  
  764. /*
  765.  * DDBLTBATCH: BltBatch entry structure
  766.  */
  767. typedef struct _DDBLTBATCH
  768. {
  769.     LPRECT              lprDest;
  770.     LPDIRECTDRAWSURFACE lpDDSSrc;
  771.     LPRECT              lprSrc;
  772.     DWORD               dwFlags;
  773.     LPDDBLTFX           lpDDBltFx;
  774. } DDBLTBATCH;
  775.  
  776. typedef DDBLTBATCH FAR * LPDDBLTBATCH;
  777.  
  778.  
  779. /*
  780.  * DDGAMMARAMP
  781.  */
  782. typedef struct _DDGAMMARAMP
  783. {
  784.     WORD                red[256];
  785.     WORD                green[256];
  786.     WORD                blue[256];
  787. } DDGAMMARAMP;
  788. typedef DDGAMMARAMP FAR * LPDDGAMMARAMP;
  789.  
  790. /*
  791.  *  This is the structure within which DirectDraw returns data about the current graphics driver and chipset
  792.  */
  793.  
  794. #define MAX_DDDEVICEID_STRING           512
  795.  
  796. typedef struct tagDDDEVICEIDENTIFIER
  797. {
  798.     /*
  799.      * These elements are for presentation to the user only. They should not be used to identify particular
  800.      * drivers, since this is unreliable and many different strings may be associated with the same
  801.      * device, and the same driver from different vendors.
  802.      */
  803.     char    szDriver[MAX_DDDEVICEID_STRING];
  804.     char    szDescription[MAX_DDDEVICEID_STRING];
  805.  
  806.     /*
  807.      * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
  808.      * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
  809.      * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
  810.      *
  811.      * This version has the form:
  812.      *  wProduct = HIWORD(liDriverVersion.HighPart)
  813.      *  wVersion = LOWORD(liDriverVersion.HighPart)
  814.      *  wSubVersion = HIWORD(liDriverVersion.LowPart)
  815.      *  wBuild = LOWORD(liDriverVersion.LowPart)
  816.      */
  817. #ifdef _WIN32
  818.     LARGE_INTEGER liDriverVersion;      /* Defined for applications and other 32 bit components */
  819. #else
  820.     DWORD   dwDriverVersionLowPart;     /* Defined for 16 bit driver components */
  821.     DWORD   dwDriverVersionHighPart;
  822. #endif
  823.  
  824.  
  825.     /*
  826.      * These elements can be used to identify particular chipsets. Use with extreme caution.
  827.      *   dwVendorId     Identifies the manufacturer. May be zero if unknown.
  828.      *   dwDeviceId     Identifies the type of chipset. May be zero if unknown.
  829.      *   dwSubSysId     Identifies the subsystem, typically this means the particular board. May be zero if unknown.
  830.      *   dwRevision     Identifies the revision level of the chipset. May be zero if unknown.
  831.      */
  832.     DWORD   dwVendorId;
  833.     DWORD   dwDeviceId;
  834.     DWORD   dwSubSysId;
  835.     DWORD   dwRevision;
  836.  
  837.     /*
  838.      * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
  839.      * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
  840.      * reprofile the graphics subsystem.
  841.      * This element can also be used to identify particular problematic drivers.
  842.      */
  843.     GUID    guidDeviceIdentifier;
  844. } DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
  845.  
  846. typedef struct tagDDDEVICEIDENTIFIER2
  847. {
  848.     /*
  849.      * These elements are for presentation to the user only. They should not be used to identify particular
  850.      * drivers, since this is unreliable and many different strings may be associated with the same
  851.      * device, and the same driver from different vendors.
  852.      */
  853.     char    szDriver[MAX_DDDEVICEID_STRING];
  854.     char    szDescription[MAX_DDDEVICEID_STRING];
  855.  
  856.     /*
  857.      * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
  858.      * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
  859.      * drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
  860.      *
  861.      * This version has the form:
  862.      *  wProduct = HIWORD(liDriverVersion.HighPart)
  863.      *  wVersion = LOWORD(liDriverVersion.HighPart)
  864.      *  wSubVersion = HIWORD(liDriverVersion.LowPart)
  865.      *  wBuild = LOWORD(liDriverVersion.LowPart)
  866.      */
  867. #ifdef _WIN32
  868.     LARGE_INTEGER liDriverVersion;      /* Defined for applications and other 32 bit components */
  869. #else
  870.     DWORD   dwDriverVersionLowPart;     /* Defined for 16 bit driver components */
  871.     DWORD   dwDriverVersionHighPart;
  872. #endif
  873.  
  874.  
  875.     /*
  876.      * These elements can be used to identify particular chipsets. Use with extreme caution.
  877.      *   dwVendorId     Identifies the manufacturer. May be zero if unknown.
  878.      *   dwDeviceId     Identifies the type of chipset. May be zero if unknown.
  879.      *   dwSubSysId     Identifies the subsystem, typically this means the particular board. May be zero if unknown.
  880.      *   dwRevision     Identifies the revision level of the chipset. May be zero if unknown.
  881.      */
  882.     DWORD   dwVendorId;
  883.     DWORD   dwDeviceId;
  884.     DWORD   dwSubSysId;
  885.     DWORD   dwRevision;
  886.  
  887.     /*
  888.      * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
  889.      * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
  890.      * reprofile the graphics subsystem.
  891.      * This element can also be used to identify particular problematic drivers.
  892.      */
  893.     GUID    guidDeviceIdentifier;
  894.  
  895.     /*
  896.      * This element is used to determine the Windows Hardware Quality Lab (WHQL)
  897.      * certification level for this driver/device pair.
  898.      */
  899.     DWORD   dwWHQLLevel;
  900.  
  901. } DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
  902.  
  903. /*
  904.  * Flags for the IDirectDraw4::GetDeviceIdentifier method
  905.  */
  906.  
  907. /*
  908.  * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped
  909.  * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the
  910.  * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is
  911.  * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities
  912.  * of the DirectDraw object involved.
  913.  */
  914. #define DDGDI_GETHOSTIDENTIFIER         0x00000001L
  915.  
  916. /*
  917.  * Macros for interpretting DDEVICEIDENTIFIER2.dwWHQLLevel
  918.  */
  919. #define GET_WHQL_YEAR( dwWHQLLevel ) \
  920.     ( (dwWHQLLevel) / 0x10000 )
  921. #define GET_WHQL_MONTH( dwWHQLLevel ) \
  922.     ( ( (dwWHQLLevel) / 0x100 ) & 0x00ff )
  923. #define GET_WHQL_DAY( dwWHQLLevel ) \
  924.     ( (dwWHQLLevel) & 0xff )
  925.  
  926.  
  927. /*
  928.  * callbacks
  929.  */
  930. typedef DWORD   (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
  931. #ifdef STREAMING
  932. typedef DWORD   (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
  933. #endif
  934.  
  935.  
  936. /*
  937.  * INTERACES FOLLOW:
  938.  *      IDirectDraw
  939.  *      IDirectDrawClipper
  940.  *      IDirectDrawPalette
  941.  *      IDirectDrawSurface
  942.  */
  943.  
  944. /*
  945.  * IDirectDraw
  946.  */
  947. #if defined( _WIN32 ) && !defined( _NO_COM )
  948. #undef INTERFACE
  949. #define INTERFACE IDirectDraw
  950. DECLARE_INTERFACE_( IDirectDraw, IUnknown )
  951. {
  952.     /*** IUnknown methods ***/
  953.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  954.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  955.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  956.     /*** IDirectDraw methods ***/
  957.     STDMETHOD(Compact)(THIS) PURE;
  958.     STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  959.     STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  960.     STDMETHOD(CreateSurface)(THIS_  LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  961.     STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  962.     STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  963.     STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  964.     STDMETHOD(FlipToGDISurface)(THIS) PURE;
  965.     STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  966.     STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  967.     STDMETHOD(GetFourCCCodes)(THIS_  LPDWORD, LPDWORD ) PURE;
  968.     STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  969.     STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  970.     STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  971.     STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  972.     STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  973.     STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  974.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  975.     STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
  976.     STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  977. };
  978.  
  979. #if !defined(__cplusplus) || defined(CINTERFACE)
  980. #define IDirectDraw_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  981. #define IDirectDraw_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  982. #define IDirectDraw_Release(p)                      (p)->lpVtbl->Release(p)
  983. #define IDirectDraw_Compact(p)                      (p)->lpVtbl->Compact(p)
  984. #define IDirectDraw_CreateClipper(p, a, b, c)       (p)->lpVtbl->CreateClipper(p, a, b, c)
  985. #define IDirectDraw_CreatePalette(p, a, b, c, d)    (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  986. #define IDirectDraw_CreateSurface(p, a, b, c)       (p)->lpVtbl->CreateSurface(p, a, b, c)
  987. #define IDirectDraw_DuplicateSurface(p, a, b)       (p)->lpVtbl->DuplicateSurface(p, a, b)
  988. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  989. #define IDirectDraw_EnumSurfaces(p, a, b, c, d)     (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  990. #define IDirectDraw_FlipToGDISurface(p)             (p)->lpVtbl->FlipToGDISurface(p)
  991. #define IDirectDraw_GetCaps(p, a, b)                (p)->lpVtbl->GetCaps(p, a, b)
  992. #define IDirectDraw_GetDisplayMode(p, a)            (p)->lpVtbl->GetDisplayMode(p, a)
  993. #define IDirectDraw_GetFourCCCodes(p, a, b)         (p)->lpVtbl->GetFourCCCodes(p, a, b)
  994. #define IDirectDraw_GetGDISurface(p, a)             (p)->lpVtbl->GetGDISurface(p, a)
  995. #define IDirectDraw_GetMonitorFrequency(p, a)       (p)->lpVtbl->GetMonitorFrequency(p, a)
  996. #define IDirectDraw_GetScanLine(p, a)               (p)->lpVtbl->GetScanLine(p, a)
  997. #define IDirectDraw_GetVerticalBlankStatus(p, a)    (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  998. #define IDirectDraw_Initialize(p, a)                (p)->lpVtbl->Initialize(p, a)
  999. #define IDirectDraw_RestoreDisplayMode(p)           (p)->lpVtbl->RestoreDisplayMode(p)
  1000. #define IDirectDraw_SetCooperativeLevel(p, a, b)    (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  1001. #define IDirectDraw_SetDisplayMode(p, a, b, c)      (p)->lpVtbl->SetDisplayMode(p, a, b, c)
  1002. #define IDirectDraw_WaitForVerticalBlank(p, a, b)   (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  1003. #else
  1004. #define IDirectDraw_QueryInterface(p, a, b)         (p)->QueryInterface(a, b)
  1005. #define IDirectDraw_AddRef(p)                       (p)->AddRef()
  1006. #define IDirectDraw_Release(p)                      (p)->Release()
  1007. #define IDirectDraw_Compact(p)                      (p)->Compact()
  1008. #define IDirectDraw_CreateClipper(p, a, b, c)       (p)->CreateClipper(a, b, c)
  1009. #define IDirectDraw_CreatePalette(p, a, b, c, d)    (p)->CreatePalette(a, b, c, d)
  1010. #define IDirectDraw_CreateSurface(p, a, b, c)       (p)->CreateSurface(a, b, c)
  1011. #define IDirectDraw_DuplicateSurface(p, a, b)       (p)->DuplicateSurface(a, b)
  1012. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  1013. #define IDirectDraw_EnumSurfaces(p, a, b, c, d)     (p)->EnumSurfaces(a, b, c, d)
  1014. #define IDirectDraw_FlipToGDISurface(p)             (p)->FlipToGDISurface()
  1015. #define IDirectDraw_GetCaps(p, a, b)                (p)->GetCaps(a, b)
  1016. #define IDirectDraw_GetDisplayMode(p, a)            (p)->GetDisplayMode(a)
  1017. #define IDirectDraw_GetFourCCCodes(p, a, b)         (p)->GetFourCCCodes(a, b)
  1018. #define IDirectDraw_GetGDISurface(p, a)             (p)->GetGDISurface(a)
  1019. #define IDirectDraw_GetMonitorFrequency(p, a)       (p)->GetMonitorFrequency(a)
  1020. #define IDirectDraw_GetScanLine(p, a)               (p)->GetScanLine(a)
  1021. #define IDirectDraw_GetVerticalBlankStatus(p, a)    (p)->GetVerticalBlankStatus(a)
  1022. #define IDirectDraw_Initialize(p, a)                (p)->Initialize(a)
  1023. #define IDirectDraw_RestoreDisplayMode(p)           (p)->RestoreDisplayMode()
  1024. #define IDirectDraw_SetCooperativeLevel(p, a, b)    (p)->SetCooperativeLevel(a, b)
  1025. #define IDirectDraw_SetDisplayMode(p, a, b, c)      (p)->SetDisplayMode(a, b, c)
  1026. #define IDirectDraw_WaitForVerticalBlank(p, a, b)   (p)->WaitForVerticalBlank(a, b)
  1027. #endif
  1028.  
  1029. #endif
  1030.  
  1031. #if defined( _WIN32 ) && !defined( _NO_COM )
  1032. #undef INTERFACE
  1033. #define INTERFACE IDirectDraw2
  1034. DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
  1035. {
  1036.     /*** IUnknown methods ***/
  1037.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1038.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1039.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1040.     /*** IDirectDraw methods ***/
  1041.     STDMETHOD(Compact)(THIS) PURE;
  1042.     STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  1043.     STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  1044.     STDMETHOD(CreateSurface)(THIS_  LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  1045.     STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  1046.     STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  1047.     STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  1048.     STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1049.     STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  1050.     STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  1051.     STDMETHOD(GetFourCCCodes)(THIS_  LPDWORD, LPDWORD ) PURE;
  1052.     STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  1053.     STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  1054.     STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  1055.     STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  1056.     STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  1057.     STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1058.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  1059.     STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  1060.     STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  1061.     /*** Added in the v2 interface ***/
  1062.     STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
  1063. };
  1064. #if !defined(__cplusplus) || defined(CINTERFACE)
  1065. #define IDirectDraw2_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  1066. #define IDirectDraw2_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  1067. #define IDirectDraw2_Release(p)                      (p)->lpVtbl->Release(p)
  1068. #define IDirectDraw2_Compact(p)                      (p)->lpVtbl->Compact(p)
  1069. #define IDirectDraw2_CreateClipper(p, a, b, c)       (p)->lpVtbl->CreateClipper(p, a, b, c)
  1070. #define IDirectDraw2_CreatePalette(p, a, b, c, d)    (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  1071. #define IDirectDraw2_CreateSurface(p, a, b, c)       (p)->lpVtbl->CreateSurface(p, a, b, c)
  1072. #define IDirectDraw2_DuplicateSurface(p, a, b)       (p)->lpVtbl->DuplicateSurface(p, a, b)
  1073. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  1074. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d)     (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  1075. #define IDirectDraw2_FlipToGDISurface(p)             (p)->lpVtbl->FlipToGDISurface(p)
  1076. #define IDirectDraw2_GetCaps(p, a, b)                (p)->lpVtbl->GetCaps(p, a, b)
  1077. #define IDirectDraw2_GetDisplayMode(p, a)            (p)->lpVtbl->GetDisplayMode(p, a)
  1078. #define IDirectDraw2_GetFourCCCodes(p, a, b)         (p)->lpVtbl->GetFourCCCodes(p, a, b)
  1079. #define IDirectDraw2_GetGDISurface(p, a)             (p)->lpVtbl->GetGDISurface(p, a)
  1080. #define IDirectDraw2_GetMonitorFrequency(p, a)       (p)->lpVtbl->GetMonitorFrequency(p, a)
  1081. #define IDirectDraw2_GetScanLine(p, a)               (p)->lpVtbl->GetScanLine(p, a)
  1082. #define IDirectDraw2_GetVerticalBlankStatus(p, a)    (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  1083. #define IDirectDraw2_Initialize(p, a)                (p)->lpVtbl->Initialize(p, a)
  1084. #define IDirectDraw2_RestoreDisplayMode(p)           (p)->lpVtbl->RestoreDisplayMode(p)
  1085. #define IDirectDraw2_SetCooperativeLevel(p, a, b)    (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  1086. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  1087. #define IDirectDraw2_WaitForVerticalBlank(p, a, b)   (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  1088. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c)  (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  1089. #else
  1090. #define IDirectDraw2_QueryInterface(p, a, b)         (p)->QueryInterface(a, b)
  1091. #define IDirectDraw2_AddRef(p)                       (p)->AddRef()
  1092. #define IDirectDraw2_Release(p)                      (p)->Release()
  1093. #define IDirectDraw2_Compact(p)                      (p)->Compact()
  1094. #define IDirectDraw2_CreateClipper(p, a, b, c)       (p)->CreateClipper(a, b, c)
  1095. #define IDirectDraw2_CreatePalette(p, a, b, c, d)    (p)->CreatePalette(a, b, c, d)
  1096. #define IDirectDraw2_CreateSurface(p, a, b, c)       (p)->CreateSurface(a, b, c)
  1097. #define IDirectDraw2_DuplicateSurface(p, a, b)       (p)->DuplicateSurface(a, b)
  1098. #define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  1099. #define IDirectDraw2_EnumSurfaces(p, a, b, c, d)     (p)->EnumSurfaces(a, b, c, d)
  1100. #define IDirectDraw2_FlipToGDISurface(p)             (p)->FlipToGDISurface()
  1101. #define IDirectDraw2_GetCaps(p, a, b)                (p)->GetCaps(a, b)
  1102. #define IDirectDraw2_GetDisplayMode(p, a)            (p)->GetDisplayMode(a)
  1103. #define IDirectDraw2_GetFourCCCodes(p, a, b)         (p)->GetFourCCCodes(a, b)
  1104. #define IDirectDraw2_GetGDISurface(p, a)             (p)->GetGDISurface(a)
  1105. #define IDirectDraw2_GetMonitorFrequency(p, a)       (p)->GetMonitorFrequency(a)
  1106. #define IDirectDraw2_GetScanLine(p, a)               (p)->GetScanLine(a)
  1107. #define IDirectDraw2_GetVerticalBlankStatus(p, a)    (p)->GetVerticalBlankStatus(a)
  1108. #define IDirectDraw2_Initialize(p, a)                (p)->Initialize(a)
  1109. #define IDirectDraw2_RestoreDisplayMode(p)           (p)->RestoreDisplayMode()
  1110. #define IDirectDraw2_SetCooperativeLevel(p, a, b)    (p)->SetCooperativeLevel(a, b)
  1111. #define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
  1112. #define IDirectDraw2_WaitForVerticalBlank(p, a, b)   (p)->WaitForVerticalBlank(a, b)
  1113. #define IDirectDraw2_GetAvailableVidMem(p, a, b, c)  (p)->GetAvailableVidMem(a, b, c)
  1114. #endif
  1115.  
  1116. #endif
  1117.  
  1118. #if defined( _WIN32 ) && !defined( _NO_COM )
  1119. #undef INTERFACE
  1120. #define INTERFACE IDirectDraw4
  1121. DECLARE_INTERFACE_( IDirectDraw4, IUnknown )
  1122. {
  1123.     /*** IUnknown methods ***/
  1124.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1125.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1126.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1127.     /*** IDirectDraw methods ***/
  1128.     STDMETHOD(Compact)(THIS) PURE;
  1129.     STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  1130.     STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  1131.     STDMETHOD(CreateSurface)(THIS_  LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE4 FAR *, IUnknown FAR *) PURE;
  1132.     STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE4, LPDIRECTDRAWSURFACE4 FAR * ) PURE;
  1133.     STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE;
  1134.     STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK2 ) PURE;
  1135.     STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1136.     STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  1137.     STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE;
  1138.     STDMETHOD(GetFourCCCodes)(THIS_  LPDWORD, LPDWORD ) PURE;
  1139.     STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4 FAR *) PURE;
  1140.     STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  1141.     STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  1142.     STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  1143.     STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  1144.     STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1145.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  1146.     STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  1147.     STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  1148.     /*** Added in the v2 interface ***/
  1149.     STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE;
  1150.     /*** Added in the V4 Interface ***/
  1151.     STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE4 *) PURE;
  1152.     STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
  1153.     STDMETHOD(TestCooperativeLevel)(THIS) PURE;
  1154.     STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER, DWORD ) PURE;
  1155. };
  1156. #if !defined(__cplusplus) || defined(CINTERFACE)
  1157. #define IDirectDraw4_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  1158. #define IDirectDraw4_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  1159. #define IDirectDraw4_Release(p)                      (p)->lpVtbl->Release(p)
  1160. #define IDirectDraw4_Compact(p)                      (p)->lpVtbl->Compact(p)
  1161. #define IDirectDraw4_CreateClipper(p, a, b, c)       (p)->lpVtbl->CreateClipper(p, a, b, c)
  1162. #define IDirectDraw4_CreatePalette(p, a, b, c, d)    (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  1163. #define IDirectDraw4_CreateSurface(p, a, b, c)       (p)->lpVtbl->CreateSurface(p, a, b, c)
  1164. #define IDirectDraw4_DuplicateSurface(p, a, b)       (p)->lpVtbl->DuplicateSurface(p, a, b)
  1165. #define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  1166. #define IDirectDraw4_EnumSurfaces(p, a, b, c, d)     (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  1167. #define IDirectDraw4_FlipToGDISurface(p)             (p)->lpVtbl->FlipToGDISurface(p)
  1168. #define IDirectDraw4_GetCaps(p, a, b)                (p)->lpVtbl->GetCaps(p, a, b)
  1169. #define IDirectDraw4_GetDisplayMode(p, a)            (p)->lpVtbl->GetDisplayMode(p, a)
  1170. #define IDirectDraw4_GetFourCCCodes(p, a, b)         (p)->lpVtbl->GetFourCCCodes(p, a, b)
  1171. #define IDirectDraw4_GetGDISurface(p, a)             (p)->lpVtbl->GetGDISurface(p, a)
  1172. #define IDirectDraw4_GetMonitorFrequency(p, a)       (p)->lpVtbl->GetMonitorFrequency(p, a)
  1173. #define IDirectDraw4_GetScanLine(p, a)               (p)->lpVtbl->GetScanLine(p, a)
  1174. #define IDirectDraw4_GetVerticalBlankStatus(p, a)    (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  1175. #define IDirectDraw4_Initialize(p, a)                (p)->lpVtbl->Initialize(p, a)
  1176. #define IDirectDraw4_RestoreDisplayMode(p)           (p)->lpVtbl->RestoreDisplayMode(p)
  1177. #define IDirectDraw4_SetCooperativeLevel(p, a, b)    (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  1178. #define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  1179. #define IDirectDraw4_WaitForVerticalBlank(p, a, b)   (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  1180. #define IDirectDraw4_GetAvailableVidMem(p, a, b, c)  (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  1181. #define IDirectDraw4_GetSurfaceFromDC(p, a, b)       (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
  1182. #define IDirectDraw4_RestoreAllSurfaces(p)           (p)->lpVtbl->RestoreAllSurfaces(p)
  1183. #define IDirectDraw4_TestCooperativeLevel(p)         (p)->lpVtbl->TestCooperativeLevel(p)
  1184. #define IDirectDraw4_GetDeviceIdentifier(p,a,b)      (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
  1185. #else
  1186. #define IDirectDraw4_QueryInterface(p, a, b)         (p)->QueryInterface(a, b)
  1187. #define IDirectDraw4_AddRef(p)                       (p)->AddRef()
  1188. #define IDirectDraw4_Release(p)                      (p)->Release()
  1189. #define IDirectDraw4_Compact(p)                      (p)->Compact()
  1190. #define IDirectDraw4_CreateClipper(p, a, b, c)       (p)->CreateClipper(a, b, c)
  1191. #define IDirectDraw4_CreatePalette(p, a, b, c, d)    (p)->CreatePalette(a, b, c, d)
  1192. #define IDirectDraw4_CreateSurface(p, a, b, c)       (p)->CreateSurface(a, b, c)
  1193. #define IDirectDraw4_DuplicateSurface(p, a, b)       (p)->DuplicateSurface(a, b)
  1194. #define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  1195. #define IDirectDraw4_EnumSurfaces(p, a, b, c, d)     (p)->EnumSurfaces(a, b, c, d)
  1196. #define IDirectDraw4_FlipToGDISurface(p)             (p)->FlipToGDISurface()
  1197. #define IDirectDraw4_GetCaps(p, a, b)                (p)->GetCaps(a, b)
  1198. #define IDirectDraw4_GetDisplayMode(p, a)            (p)->GetDisplayMode(a)
  1199. #define IDirectDraw4_GetFourCCCodes(p, a, b)         (p)->GetFourCCCodes(a, b)
  1200. #define IDirectDraw4_GetGDISurface(p, a)             (p)->GetGDISurface(a)
  1201. #define IDirectDraw4_GetMonitorFrequency(p, a)       (p)->GetMonitorFrequency(a)
  1202. #define IDirectDraw4_GetScanLine(p, a)               (p)->GetScanLine(a)
  1203. #define IDirectDraw4_GetVerticalBlankStatus(p, a)    (p)->GetVerticalBlankStatus(a)
  1204. #define IDirectDraw4_Initialize(p, a)                (p)->Initialize(a)
  1205. #define IDirectDraw4_RestoreDisplayMode(p)           (p)->RestoreDisplayMode()
  1206. #define IDirectDraw4_SetCooperativeLevel(p, a, b)    (p)->SetCooperativeLevel(a, b)
  1207. #define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
  1208. #define IDirectDraw4_WaitForVerticalBlank(p, a, b)   (p)->WaitForVerticalBlank(a, b)
  1209. #define IDirectDraw4_GetAvailableVidMem(p, a, b, c)  (p)->GetAvailableVidMem(a, b, c)
  1210. #define IDirectDraw4_GetSurfaceFromDC(p, a, b)       (p)->GetSurfaceFromDC(a, b)
  1211. #define IDirectDraw4_RestoreAllSurfaces(p)           (p)->RestoreAllSurfaces()
  1212. #define IDirectDraw4_TestCooperativeLevel(p)         (p)->TestCooperativeLevel()
  1213. #define IDirectDraw4_GetDeviceIdentifier(p,a,b)      (p)->GetDeviceIdentifier(a,b)
  1214. #endif
  1215.  
  1216. #endif
  1217.  
  1218. #if defined( _WIN32 ) && !defined( _NO_COM )
  1219. #undef INTERFACE
  1220. #define INTERFACE IDirectDraw7
  1221. DECLARE_INTERFACE_( IDirectDraw7, IUnknown )
  1222. {
  1223.     /*** IUnknown methods ***/
  1224.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1225.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1226.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1227.     /*** IDirectDraw methods ***/
  1228.     STDMETHOD(Compact)(THIS) PURE;
  1229.     STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  1230.     STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  1231.     STDMETHOD(CreateSurface)(THIS_  LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE7 FAR *, IUnknown FAR *) PURE;
  1232.     STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE7, LPDIRECTDRAWSURFACE7 FAR * ) PURE;
  1233.     STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE;
  1234.     STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK7 ) PURE;
  1235.     STDMETHOD(FlipToGDISurface)(THIS) PURE;
  1236.     STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  1237.     STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE;
  1238.     STDMETHOD(GetFourCCCodes)(THIS_  LPDWORD, LPDWORD ) PURE;
  1239.     STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE7 FAR *) PURE;
  1240.     STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  1241.     STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  1242.     STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  1243.     STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  1244.     STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  1245.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  1246.     STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
  1247.     STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  1248.     /*** Added in the v2 interface ***/
  1249.     STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE;
  1250.     /*** Added in the V4 Interface ***/
  1251.     STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE7 *) PURE;
  1252.     STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
  1253.     STDMETHOD(TestCooperativeLevel)(THIS) PURE;
  1254.     STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER2, DWORD ) PURE;
  1255.     STDMETHOD(StartModeTest)(THIS_ LPSIZE, DWORD, DWORD ) PURE;
  1256.     STDMETHOD(EvaluateMode)(THIS_ DWORD, DWORD * ) PURE;
  1257. };
  1258. #if !defined(__cplusplus) || defined(CINTERFACE)
  1259. #define IDirectDraw7_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  1260. #define IDirectDraw7_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  1261. #define IDirectDraw7_Release(p)                      (p)->lpVtbl->Release(p)
  1262. #define IDirectDraw7_Compact(p)                      (p)->lpVtbl->Compact(p)
  1263. #define IDirectDraw7_CreateClipper(p, a, b, c)       (p)->lpVtbl->CreateClipper(p, a, b, c)
  1264. #define IDirectDraw7_CreatePalette(p, a, b, c, d)    (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  1265. #define IDirectDraw7_CreateSurface(p, a, b, c)       (p)->lpVtbl->CreateSurface(p, a, b, c)
  1266. #define IDirectDraw7_DuplicateSurface(p, a, b)       (p)->lpVtbl->DuplicateSurface(p, a, b)
  1267. #define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  1268. #define IDirectDraw7_EnumSurfaces(p, a, b, c, d)     (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  1269. #define IDirectDraw7_FlipToGDISurface(p)             (p)->lpVtbl->FlipToGDISurface(p)
  1270. #define IDirectDraw7_GetCaps(p, a, b)                (p)->lpVtbl->GetCaps(p, a, b)
  1271. #define IDirectDraw7_GetDisplayMode(p, a)            (p)->lpVtbl->GetDisplayMode(p, a)
  1272. #define IDirectDraw7_GetFourCCCodes(p, a, b)         (p)->lpVtbl->GetFourCCCodes(p, a, b)
  1273. #define IDirectDraw7_GetGDISurface(p, a)             (p)->lpVtbl->GetGDISurface(p, a)
  1274. #define IDirectDraw7_GetMonitorFrequency(p, a)       (p)->lpVtbl->GetMonitorFrequency(p, a)
  1275. #define IDirectDraw7_GetScanLine(p, a)               (p)->lpVtbl->GetScanLine(p, a)
  1276. #define IDirectDraw7_GetVerticalBlankStatus(p, a)    (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  1277. #define IDirectDraw7_Initialize(p, a)                (p)->lpVtbl->Initialize(p, a)
  1278. #define IDirectDraw7_RestoreDisplayMode(p)           (p)->lpVtbl->RestoreDisplayMode(p)
  1279. #define IDirectDraw7_SetCooperativeLevel(p, a, b)    (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  1280. #define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
  1281. #define IDirectDraw7_WaitForVerticalBlank(p, a, b)   (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  1282. #define IDirectDraw7_GetAvailableVidMem(p, a, b, c)  (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
  1283. #define IDirectDraw7_GetSurfaceFromDC(p, a, b)       (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
  1284. #define IDirectDraw7_RestoreAllSurfaces(p)           (p)->lpVtbl->RestoreAllSurfaces(p)
  1285. #define IDirectDraw7_TestCooperativeLevel(p)         (p)->lpVtbl->TestCooperativeLevel(p)
  1286. #define IDirectDraw7_GetDeviceIdentifier(p,a,b)      (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
  1287. #define IDirectDraw7_StartModeTest(p,a,b,c)        (p)->lpVtbl->StartModeTest(p,a,b,c)
  1288. #define IDirectDraw7_EvaluateMode(p,a,b)           (p)->lpVtbl->EvaluateMode(p,a,b)
  1289. #else
  1290. #define IDirectDraw7_QueryInterface(p, a, b)         (p)->QueryInterface(a, b)
  1291. #define IDirectDraw7_AddRef(p)                       (p)->AddRef()
  1292. #define IDirectDraw7_Release(p)                      (p)->Release()
  1293. #define IDirectDraw7_Compact(p)                      (p)->Compact()
  1294. #define IDirectDraw7_CreateClipper(p, a, b, c)       (p)->CreateClipper(a, b, c)
  1295. #define IDirectDraw7_CreatePalette(p, a, b, c, d)    (p)->CreatePalette(a, b, c, d)
  1296. #define IDirectDraw7_CreateSurface(p, a, b, c)       (p)->CreateSurface(a, b, c)
  1297. #define IDirectDraw7_DuplicateSurface(p, a, b)       (p)->DuplicateSurface(a, b)
  1298. #define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
  1299. #define IDirectDraw7_EnumSurfaces(p, a, b, c, d)     (p)->EnumSurfaces(a, b, c, d)
  1300. #define IDirectDraw7_FlipToGDISurface(p)             (p)->FlipToGDISurface()
  1301. #define IDirectDraw7_GetCaps(p, a, b)                (p)->GetCaps(a, b)
  1302. #define IDirectDraw7_GetDisplayMode(p, a)            (p)->GetDisplayMode(a)
  1303. #define IDirectDraw7_GetFourCCCodes(p, a, b)         (p)->GetFourCCCodes(a, b)
  1304. #define IDirectDraw7_GetGDISurface(p, a)             (p)->GetGDISurface(a)
  1305. #define IDirectDraw7_GetMonitorFrequency(p, a)       (p)->GetMonitorFrequency(a)
  1306. #define IDirectDraw7_GetScanLine(p, a)               (p)->GetScanLine(a)
  1307. #define IDirectDraw7_GetVerticalBlankStatus(p, a)    (p)->GetVerticalBlankStatus(a)
  1308. #define IDirectDraw7_Initialize(p, a)                (p)->Initialize(a)
  1309. #define IDirectDraw7_RestoreDisplayMode(p)           (p)->RestoreDisplayMode()
  1310. #define IDirectDraw7_SetCooperativeLevel(p, a, b)    (p)->SetCooperativeLevel(a, b)
  1311. #define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
  1312. #define IDirectDraw7_WaitForVerticalBlank(p, a, b)   (p)->WaitForVerticalBlank(a, b)
  1313. #define IDirectDraw7_GetAvailableVidMem(p, a, b, c)  (p)->GetAvailableVidMem(a, b, c)
  1314. #define IDirectDraw7_GetSurfaceFromDC(p, a, b)       (p)->GetSurfaceFromDC(a, b)
  1315. #define IDirectDraw7_RestoreAllSurfaces(p)           (p)->RestoreAllSurfaces()
  1316. #define IDirectDraw7_TestCooperativeLevel(p)         (p)->TestCooperativeLevel()
  1317. #define IDirectDraw7_GetDeviceIdentifier(p,a,b)      (p)->GetDeviceIdentifier(a,b)
  1318. #define IDirectDraw7_StartModeTest(p,a,b,c)        (p)->lpVtbl->StartModeTest(a,b,c)
  1319. #define IDirectDraw7_EvaluateMode(p,a,b)           (p)->lpVtbl->EvaluateMode(a,b)
  1320. #endif
  1321.  
  1322. #endif
  1323.  
  1324.  
  1325. /*
  1326.  * IDirectDrawPalette
  1327.  */
  1328. #if defined( _WIN32 ) && !defined( _NO_COM )
  1329. #undef INTERFACE
  1330. #define INTERFACE IDirectDrawPalette
  1331. DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
  1332. {
  1333.     /*** IUnknown methods ***/
  1334.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1335.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1336.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1337.     /*** IDirectDrawPalette methods ***/
  1338.     STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
  1339.     STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  1340.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
  1341.     STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  1342. };
  1343.  
  1344. #if !defined(__cplusplus) || defined(CINTERFACE)
  1345. #define IDirectDrawPalette_QueryInterface(p, a, b)      (p)->lpVtbl->QueryInterface(p, a, b)
  1346. #define IDirectDrawPalette_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  1347. #define IDirectDrawPalette_Release(p)                   (p)->lpVtbl->Release(p)
  1348. #define IDirectDrawPalette_GetCaps(p, a)                (p)->lpVtbl->GetCaps(p, a)
  1349. #define IDirectDrawPalette_GetEntries(p, a, b, c, d)    (p)->lpVtbl->GetEntries(p, a, b, c, d)
  1350. #define IDirectDrawPalette_Initialize(p, a, b, c)       (p)->lpVtbl->Initialize(p, a, b, c)
  1351. #define IDirectDrawPalette_SetEntries(p, a, b, c, d)    (p)->lpVtbl->SetEntries(p, a, b, c, d)
  1352. #else
  1353. #define IDirectDrawPalette_QueryInterface(p, a, b)      (p)->QueryInterface(a, b)
  1354. #define IDirectDrawPalette_AddRef(p)                    (p)->AddRef()
  1355. #define IDirectDrawPalette_Release(p)                   (p)->Release()
  1356. #define IDirectDrawPalette_GetCaps(p, a)                (p)->GetCaps(a)
  1357. #define IDirectDrawPalette_GetEntries(p, a, b, c, d)    (p)->GetEntries(a, b, c, d)
  1358. #define IDirectDrawPalette_Initialize(p, a, b, c)       (p)->Initialize(a, b, c)
  1359. #define IDirectDrawPalette_SetEntries(p, a, b, c, d)    (p)->SetEntries(a, b, c, d)
  1360. #endif
  1361.  
  1362. #endif
  1363.  
  1364.  
  1365.  
  1366. /*
  1367.  * IDirectDrawClipper
  1368.  */
  1369. #if defined( _WIN32 ) && !defined( _NO_COM )
  1370. #undef INTERFACE
  1371. #define INTERFACE IDirectDrawClipper
  1372. DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
  1373. {
  1374.     /*** IUnknown methods ***/
  1375.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1376.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1377.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1378.     /*** IDirectDrawClipper methods ***/
  1379.     STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
  1380.     STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
  1381.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
  1382.     STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
  1383.     STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
  1384.     STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
  1385. };
  1386.  
  1387. #if !defined(__cplusplus) || defined(CINTERFACE)
  1388. #define IDirectDrawClipper_QueryInterface(p, a, b)  (p)->lpVtbl->QueryInterface(p, a, b)
  1389. #define IDirectDrawClipper_AddRef(p)                (p)->lpVtbl->AddRef(p)
  1390. #define IDirectDrawClipper_Release(p)               (p)->lpVtbl->Release(p)
  1391. #define IDirectDrawClipper_GetClipList(p, a, b, c)  (p)->lpVtbl->GetClipList(p, a, b, c)
  1392. #define IDirectDrawClipper_GetHWnd(p, a)            (p)->lpVtbl->GetHWnd(p, a)
  1393. #define IDirectDrawClipper_Initialize(p, a, b)      (p)->lpVtbl->Initialize(p, a, b)
  1394. #define IDirectDrawClipper_IsClipListChanged(p, a)  (p)->lpVtbl->IsClipListChanged(p, a)
  1395. #define IDirectDrawClipper_SetClipList(p, a, b)     (p)->lpVtbl->SetClipList(p, a, b)
  1396. #define IDirectDrawClipper_SetHWnd(p, a, b)         (p)->lpVtbl->SetHWnd(p, a, b)
  1397. #else
  1398. #define IDirectDrawClipper_QueryInterface(p, a, b)  (p)->QueryInterface(a, b)
  1399. #define IDirectDrawClipper_AddRef(p)                (p)->AddRef()
  1400. #define IDirectDrawClipper_Release(p)               (p)->Release()
  1401. #define IDirectDrawClipper_GetClipList(p, a, b, c)  (p)->GetClipList(a, b, c)
  1402. #define IDirectDrawClipper_GetHWnd(p, a)            (p)->GetHWnd(a)
  1403. #define IDirectDrawClipper_Initialize(p, a, b)      (p)->Initialize(a, b)
  1404. #define IDirectDrawClipper_IsClipListChanged(p, a)  (p)->IsClipListChanged(a)
  1405. #define IDirectDrawClipper_SetClipList(p, a, b)     (p)->SetClipList(a, b)
  1406. #define IDirectDrawClipper_SetHWnd(p, a, b)         (p)->SetHWnd(a, b)
  1407. #endif
  1408.  
  1409. #endif
  1410.  
  1411. /*
  1412.  * IDirectDrawSurface and related interfaces
  1413.  */
  1414. #if defined( _WIN32 ) && !defined( _NO_COM )
  1415. #undef INTERFACE
  1416. #define INTERFACE IDirectDrawSurface
  1417. DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
  1418. {
  1419.     /*** IUnknown methods ***/
  1420.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1421.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1422.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1423.     /*** IDirectDrawSurface methods ***/
  1424.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  1425.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1426.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
  1427.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1428.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
  1429.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  1430.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1431.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1432.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  1433.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
  1434.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1435.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  1436.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1437.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1438.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1439.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1440.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1441.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1442.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1443.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  1444.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  1445.     STDMETHOD(IsLost)(THIS) PURE;
  1446.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  1447.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1448.     STDMETHOD(Restore)(THIS) PURE;
  1449.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1450.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1451.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1452.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1453.     STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  1454.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1455.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1456.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
  1457. };
  1458.  
  1459. #if !defined(__cplusplus) || defined(CINTERFACE)
  1460. #define IDirectDrawSurface_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  1461. #define IDirectDrawSurface_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  1462. #define IDirectDrawSurface_Release(p)                   (p)->lpVtbl->Release(p)
  1463. #define IDirectDrawSurface_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  1464. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1465. #define IDirectDrawSurface_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1466. #define IDirectDrawSurface_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  1467. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1468. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1469. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1470. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1471. #define IDirectDrawSurface_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  1472. #define IDirectDrawSurface_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1473. #define IDirectDrawSurface_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  1474. #define IDirectDrawSurface_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  1475. #define IDirectDrawSurface_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  1476. #define IDirectDrawSurface_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  1477. #define IDirectDrawSurface_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  1478. #define IDirectDrawSurface_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  1479. #define IDirectDrawSurface_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1480. #define IDirectDrawSurface_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  1481. #define IDirectDrawSurface_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  1482. #define IDirectDrawSurface_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  1483. #define IDirectDrawSurface_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  1484. #define IDirectDrawSurface_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  1485. #define IDirectDrawSurface_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  1486. #define IDirectDrawSurface_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  1487. #define IDirectDrawSurface_Restore(p)                   (p)->lpVtbl->Restore(p)
  1488. #define IDirectDrawSurface_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  1489. #define IDirectDrawSurface_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  1490. #define IDirectDrawSurface_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1491. #define IDirectDrawSurface_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  1492. #define IDirectDrawSurface_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  1493. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1494. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1495. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1496. #else
  1497. #define IDirectDrawSurface_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  1498. #define IDirectDrawSurface_AddRef(p)                    (p)->AddRef()
  1499. #define IDirectDrawSurface_Release(p)                   (p)->Release()
  1500. #define IDirectDrawSurface_AddAttachedSurface(p,a)      (p)->AddAttachedSurface(a)
  1501. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a)     (p)->AddOverlayDirtyRect(a)
  1502. #define IDirectDrawSurface_Blt(p,a,b,c,d,e)             (p)->Blt(a,b,c,d,e)
  1503. #define IDirectDrawSurface_BltBatch(p,a,b,c)            (p)->BltBatch(a,b,c)
  1504. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e)         (p)->BltFast(a,b,c,d,e)
  1505. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1506. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b)  (p)->EnumAttachedSurfaces(a,b)
  1507. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c)  (p)->EnumOverlayZOrders(a,b,c)
  1508. #define IDirectDrawSurface_Flip(p,a,b)                  (p)->Flip(a,b)
  1509. #define IDirectDrawSurface_GetAttachedSurface(p,a,b)    (p)->GetAttachedSurface(a,b)
  1510. #define IDirectDrawSurface_GetBltStatus(p,a)            (p)->GetBltStatus(a)
  1511. #define IDirectDrawSurface_GetCaps(p,b)                 (p)->GetCaps(b)
  1512. #define IDirectDrawSurface_GetClipper(p,a)              (p)->GetClipper(a)
  1513. #define IDirectDrawSurface_GetColorKey(p,a,b)           (p)->GetColorKey(a,b)
  1514. #define IDirectDrawSurface_GetDC(p,a)                   (p)->GetDC(a)
  1515. #define IDirectDrawSurface_GetFlipStatus(p,a)           (p)->GetFlipStatus(a)
  1516. #define IDirectDrawSurface_GetOverlayPosition(p,a,b)    (p)->GetOverlayPosition(a,b)
  1517. #define IDirectDrawSurface_GetPalette(p,a)              (p)->GetPalette(a)
  1518. #define IDirectDrawSurface_GetPixelFormat(p,a)          (p)->GetPixelFormat(a)
  1519. #define IDirectDrawSurface_GetSurfaceDesc(p,a)          (p)->GetSurfaceDesc(a)
  1520. #define IDirectDrawSurface_Initialize(p,a,b)            (p)->Initialize(a,b)
  1521. #define IDirectDrawSurface_IsLost(p)                    (p)->IsLost()
  1522. #define IDirectDrawSurface_Lock(p,a,b,c,d)              (p)->Lock(a,b,c,d)
  1523. #define IDirectDrawSurface_ReleaseDC(p,a)               (p)->ReleaseDC(a)
  1524. #define IDirectDrawSurface_Restore(p)                   (p)->Restore()
  1525. #define IDirectDrawSurface_SetClipper(p,a)              (p)->SetClipper(a)
  1526. #define IDirectDrawSurface_SetColorKey(p,a,b)           (p)->SetColorKey(a,b)
  1527. #define IDirectDrawSurface_SetOverlayPosition(p,a,b)    (p)->SetOverlayPosition(a,b)
  1528. #define IDirectDrawSurface_SetPalette(p,a)              (p)->SetPalette(a)
  1529. #define IDirectDrawSurface_Unlock(p,b)                  (p)->Unlock(b)
  1530. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e)   (p)->UpdateOverlay(a,b,c,d,e)
  1531. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a)    (p)->UpdateOverlayDisplay(a)
  1532. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b)   (p)->UpdateOverlayZOrder(a,b)
  1533. #endif
  1534.  
  1535. /*
  1536.  * IDirectDrawSurface2 and related interfaces
  1537.  */
  1538. #undef INTERFACE
  1539. #define INTERFACE IDirectDrawSurface2
  1540. DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
  1541. {
  1542.     /*** IUnknown methods ***/
  1543.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1544.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1545.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1546.     /*** IDirectDrawSurface methods ***/
  1547.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
  1548.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1549.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
  1550.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1551.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE;
  1552.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
  1553.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1554.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1555.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
  1556.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
  1557.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1558.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  1559.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1560.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1561.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1562.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1563.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1564.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1565.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1566.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  1567.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  1568.     STDMETHOD(IsLost)(THIS) PURE;
  1569.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  1570.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1571.     STDMETHOD(Restore)(THIS) PURE;
  1572.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1573.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1574.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1575.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1576.     STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  1577.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1578.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1579.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
  1580.     /*** Added in the v2 interface ***/
  1581.     STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  1582.     STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  1583.     STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  1584. };
  1585.  
  1586. #if !defined(__cplusplus) || defined(CINTERFACE)
  1587. #define IDirectDrawSurface2_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  1588. #define IDirectDrawSurface2_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  1589. #define IDirectDrawSurface2_Release(p)                   (p)->lpVtbl->Release(p)
  1590. #define IDirectDrawSurface2_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  1591. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1592. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1593. #define IDirectDrawSurface2_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  1594. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1595. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1596. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1597. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1598. #define IDirectDrawSurface2_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  1599. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1600. #define IDirectDrawSurface2_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  1601. #define IDirectDrawSurface2_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  1602. #define IDirectDrawSurface2_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  1603. #define IDirectDrawSurface2_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  1604. #define IDirectDrawSurface2_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  1605. #define IDirectDrawSurface2_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  1606. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1607. #define IDirectDrawSurface2_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  1608. #define IDirectDrawSurface2_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  1609. #define IDirectDrawSurface2_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  1610. #define IDirectDrawSurface2_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  1611. #define IDirectDrawSurface2_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  1612. #define IDirectDrawSurface2_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  1613. #define IDirectDrawSurface2_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  1614. #define IDirectDrawSurface2_Restore(p)                   (p)->lpVtbl->Restore(p)
  1615. #define IDirectDrawSurface2_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  1616. #define IDirectDrawSurface2_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  1617. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1618. #define IDirectDrawSurface2_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  1619. #define IDirectDrawSurface2_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  1620. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1621. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1622. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1623. #define IDirectDrawSurface2_GetDDInterface(p,a)          (p)->lpVtbl->GetDDInterface(p,a)
  1624. #define IDirectDrawSurface2_PageLock(p,a)                (p)->lpVtbl->PageLock(p,a)
  1625. #define IDirectDrawSurface2_PageUnlock(p,a)              (p)->lpVtbl->PageUnlock(p,a)
  1626. #else
  1627. #define IDirectDrawSurface2_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  1628. #define IDirectDrawSurface2_AddRef(p)                    (p)->AddRef()
  1629. #define IDirectDrawSurface2_Release(p)                   (p)->Release()
  1630. #define IDirectDrawSurface2_AddAttachedSurface(p,a)      (p)->AddAttachedSurface(a)
  1631. #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a)     (p)->AddOverlayDirtyRect(a)
  1632. #define IDirectDrawSurface2_Blt(p,a,b,c,d,e)             (p)->Blt(a,b,c,d,e)
  1633. #define IDirectDrawSurface2_BltBatch(p,a,b,c)            (p)->BltBatch(a,b,c)
  1634. #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e)         (p)->BltFast(a,b,c,d,e)
  1635. #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1636. #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b)  (p)->EnumAttachedSurfaces(a,b)
  1637. #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c)  (p)->EnumOverlayZOrders(a,b,c)
  1638. #define IDirectDrawSurface2_Flip(p,a,b)                  (p)->Flip(a,b)
  1639. #define IDirectDrawSurface2_GetAttachedSurface(p,a,b)    (p)->GetAttachedSurface(a,b)
  1640. #define IDirectDrawSurface2_GetBltStatus(p,a)            (p)->GetBltStatus(a)
  1641. #define IDirectDrawSurface2_GetCaps(p,b)                 (p)->GetCaps(b)
  1642. #define IDirectDrawSurface2_GetClipper(p,a)              (p)->GetClipper(a)
  1643. #define IDirectDrawSurface2_GetColorKey(p,a,b)           (p)->GetColorKey(a,b)
  1644. #define IDirectDrawSurface2_GetDC(p,a)                   (p)->GetDC(a)
  1645. #define IDirectDrawSurface2_GetFlipStatus(p,a)           (p)->GetFlipStatus(a)
  1646. #define IDirectDrawSurface2_GetOverlayPosition(p,a,b)    (p)->GetOverlayPosition(a,b)
  1647. #define IDirectDrawSurface2_GetPalette(p,a)              (p)->GetPalette(a)
  1648. #define IDirectDrawSurface2_GetPixelFormat(p,a)          (p)->GetPixelFormat(a)
  1649. #define IDirectDrawSurface2_GetSurfaceDesc(p,a)          (p)->GetSurfaceDesc(a)
  1650. #define IDirectDrawSurface2_Initialize(p,a,b)            (p)->Initialize(a,b)
  1651. #define IDirectDrawSurface2_IsLost(p)                    (p)->IsLost()
  1652. #define IDirectDrawSurface2_Lock(p,a,b,c,d)              (p)->Lock(a,b,c,d)
  1653. #define IDirectDrawSurface2_ReleaseDC(p,a)               (p)->ReleaseDC(a)
  1654. #define IDirectDrawSurface2_Restore(p)                   (p)->Restore()
  1655. #define IDirectDrawSurface2_SetClipper(p,a)              (p)->SetClipper(a)
  1656. #define IDirectDrawSurface2_SetColorKey(p,a,b)           (p)->SetColorKey(a,b)
  1657. #define IDirectDrawSurface2_SetOverlayPosition(p,a,b)    (p)->SetOverlayPosition(a,b)
  1658. #define IDirectDrawSurface2_SetPalette(p,a)              (p)->SetPalette(a)
  1659. #define IDirectDrawSurface2_Unlock(p,b)                  (p)->Unlock(b)
  1660. #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e)   (p)->UpdateOverlay(a,b,c,d,e)
  1661. #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a)    (p)->UpdateOverlayDisplay(a)
  1662. #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b)   (p)->UpdateOverlayZOrder(a,b)
  1663. #define IDirectDrawSurface2_GetDDInterface(p,a)          (p)->GetDDInterface(a)
  1664. #define IDirectDrawSurface2_PageLock(p,a)                (p)->PageLock(a)
  1665. #define IDirectDrawSurface2_PageUnlock(p,a)              (p)->PageUnlock(a)
  1666. #endif
  1667.  
  1668. /*
  1669.  * IDirectDrawSurface3 and related interfaces
  1670.  */
  1671. #undef INTERFACE
  1672. #define INTERFACE IDirectDrawSurface3
  1673. DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
  1674. {
  1675.     /*** IUnknown methods ***/
  1676.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1677.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1678.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1679.     /*** IDirectDrawSurface methods ***/
  1680.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
  1681.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1682.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE;
  1683.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1684.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE;
  1685.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
  1686.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1687.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  1688.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
  1689.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
  1690.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1691.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  1692.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1693.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1694.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1695.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1696.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1697.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1698.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1699.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  1700.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  1701.     STDMETHOD(IsLost)(THIS) PURE;
  1702.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  1703.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1704.     STDMETHOD(Restore)(THIS) PURE;
  1705.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1706.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1707.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1708.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1709.     STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  1710.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1711.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1712.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
  1713.     /*** Added in the v2 interface ***/
  1714.     STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  1715.     STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  1716.     STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  1717.     /*** Added in the V3 interface ***/
  1718.     STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE;
  1719. };
  1720.  
  1721. #if !defined(__cplusplus) || defined(CINTERFACE)
  1722. #define IDirectDrawSurface3_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  1723. #define IDirectDrawSurface3_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  1724. #define IDirectDrawSurface3_Release(p)                   (p)->lpVtbl->Release(p)
  1725. #define IDirectDrawSurface3_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  1726. #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1727. #define IDirectDrawSurface3_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1728. #define IDirectDrawSurface3_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  1729. #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1730. #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1731. #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1732. #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1733. #define IDirectDrawSurface3_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  1734. #define IDirectDrawSurface3_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1735. #define IDirectDrawSurface3_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  1736. #define IDirectDrawSurface3_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  1737. #define IDirectDrawSurface3_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  1738. #define IDirectDrawSurface3_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  1739. #define IDirectDrawSurface3_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  1740. #define IDirectDrawSurface3_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  1741. #define IDirectDrawSurface3_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1742. #define IDirectDrawSurface3_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  1743. #define IDirectDrawSurface3_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  1744. #define IDirectDrawSurface3_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  1745. #define IDirectDrawSurface3_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  1746. #define IDirectDrawSurface3_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  1747. #define IDirectDrawSurface3_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  1748. #define IDirectDrawSurface3_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  1749. #define IDirectDrawSurface3_Restore(p)                   (p)->lpVtbl->Restore(p)
  1750. #define IDirectDrawSurface3_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  1751. #define IDirectDrawSurface3_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  1752. #define IDirectDrawSurface3_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1753. #define IDirectDrawSurface3_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  1754. #define IDirectDrawSurface3_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  1755. #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1756. #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1757. #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1758. #define IDirectDrawSurface3_GetDDInterface(p,a)          (p)->lpVtbl->GetDDInterface(p,a)
  1759. #define IDirectDrawSurface3_PageLock(p,a)                (p)->lpVtbl->PageLock(p,a)
  1760. #define IDirectDrawSurface3_PageUnlock(p,a)              (p)->lpVtbl->PageUnlock(p,a)
  1761. #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b)        (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  1762. #else
  1763. #define IDirectDrawSurface3_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  1764. #define IDirectDrawSurface3_AddRef(p)                    (p)->AddRef()
  1765. #define IDirectDrawSurface3_Release(p)                   (p)->Release()
  1766. #define IDirectDrawSurface3_AddAttachedSurface(p,a)      (p)->AddAttachedSurface(a)
  1767. #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a)     (p)->AddOverlayDirtyRect(a)
  1768. #define IDirectDrawSurface3_Blt(p,a,b,c,d,e)             (p)->Blt(a,b,c,d,e)
  1769. #define IDirectDrawSurface3_BltBatch(p,a,b,c)            (p)->BltBatch(a,b,c)
  1770. #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e)         (p)->BltFast(a,b,c,d,e)
  1771. #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1772. #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b)  (p)->EnumAttachedSurfaces(a,b)
  1773. #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c)  (p)->EnumOverlayZOrders(a,b,c)
  1774. #define IDirectDrawSurface3_Flip(p,a,b)                  (p)->Flip(a,b)
  1775. #define IDirectDrawSurface3_GetAttachedSurface(p,a,b)    (p)->GetAttachedSurface(a,b)
  1776. #define IDirectDrawSurface3_GetBltStatus(p,a)            (p)->GetBltStatus(a)
  1777. #define IDirectDrawSurface3_GetCaps(p,b)                 (p)->GetCaps(b)
  1778. #define IDirectDrawSurface3_GetClipper(p,a)              (p)->GetClipper(a)
  1779. #define IDirectDrawSurface3_GetColorKey(p,a,b)           (p)->GetColorKey(a,b)
  1780. #define IDirectDrawSurface3_GetDC(p,a)                   (p)->GetDC(a)
  1781. #define IDirectDrawSurface3_GetFlipStatus(p,a)           (p)->GetFlipStatus(a)
  1782. #define IDirectDrawSurface3_GetOverlayPosition(p,a,b)    (p)->GetOverlayPosition(a,b)
  1783. #define IDirectDrawSurface3_GetPalette(p,a)              (p)->GetPalette(a)
  1784. #define IDirectDrawSurface3_GetPixelFormat(p,a)          (p)->GetPixelFormat(a)
  1785. #define IDirectDrawSurface3_GetSurfaceDesc(p,a)          (p)->GetSurfaceDesc(a)
  1786. #define IDirectDrawSurface3_Initialize(p,a,b)            (p)->Initialize(a,b)
  1787. #define IDirectDrawSurface3_IsLost(p)                    (p)->IsLost()
  1788. #define IDirectDrawSurface3_Lock(p,a,b,c,d)              (p)->Lock(a,b,c,d)
  1789. #define IDirectDrawSurface3_ReleaseDC(p,a)               (p)->ReleaseDC(a)
  1790. #define IDirectDrawSurface3_Restore(p)                   (p)->Restore()
  1791. #define IDirectDrawSurface3_SetClipper(p,a)              (p)->SetClipper(a)
  1792. #define IDirectDrawSurface3_SetColorKey(p,a,b)           (p)->SetColorKey(a,b)
  1793. #define IDirectDrawSurface3_SetOverlayPosition(p,a,b)    (p)->SetOverlayPosition(a,b)
  1794. #define IDirectDrawSurface3_SetPalette(p,a)              (p)->SetPalette(a)
  1795. #define IDirectDrawSurface3_Unlock(p,b)                  (p)->Unlock(b)
  1796. #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e)   (p)->UpdateOverlay(a,b,c,d,e)
  1797. #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a)    (p)->UpdateOverlayDisplay(a)
  1798. #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b)   (p)->UpdateOverlayZOrder(a,b)
  1799. #define IDirectDrawSurface3_GetDDInterface(p,a)          (p)->GetDDInterface(a)
  1800. #define IDirectDrawSurface3_PageLock(p,a)                (p)->PageLock(a)
  1801. #define IDirectDrawSurface3_PageUnlock(p,a)              (p)->PageUnlock(a)
  1802. #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b)        (p)->SetSurfaceDesc(a,b)
  1803. #endif
  1804.  
  1805. /*
  1806.  * IDirectDrawSurface4 and related interfaces
  1807.  */
  1808. #undef INTERFACE
  1809. #define INTERFACE IDirectDrawSurface4
  1810. DECLARE_INTERFACE_( IDirectDrawSurface4, IUnknown )
  1811. {
  1812.     /*** IUnknown methods ***/
  1813.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1814.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1815.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1816.     /*** IDirectDrawSurface methods ***/
  1817.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4) PURE;
  1818.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1819.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE4, LPRECT,DWORD, LPDDBLTFX) PURE;
  1820.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1821.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE4, LPRECT,DWORD) PURE;
  1822.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE4) PURE;
  1823.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
  1824.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
  1825.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4, DWORD) PURE;
  1826.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE4 FAR *) PURE;
  1827.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1828.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE;
  1829.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1830.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1831.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1832.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1833.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1834.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1835.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1836.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE;
  1837.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE;
  1838.     STDMETHOD(IsLost)(THIS) PURE;
  1839.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE;
  1840.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1841.     STDMETHOD(Restore)(THIS) PURE;
  1842.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1843.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1844.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1845.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1846.     STDMETHOD(Unlock)(THIS_ LPRECT) PURE;
  1847.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE4,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  1848.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  1849.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE4) PURE;
  1850.     /*** Added in the v2 interface ***/
  1851.     STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  1852.     STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  1853.     STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  1854.     /*** Added in the v3 interface ***/
  1855.     STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE;
  1856.     /*** Added in the v4 interface ***/
  1857.     STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE;
  1858.     STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE;
  1859.     STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
  1860.     STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE;
  1861.     STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
  1862. };
  1863.  
  1864. #if !defined(__cplusplus) || defined(CINTERFACE)
  1865. #define IDirectDrawSurface4_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  1866. #define IDirectDrawSurface4_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  1867. #define IDirectDrawSurface4_Release(p)                   (p)->lpVtbl->Release(p)
  1868. #define IDirectDrawSurface4_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  1869. #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  1870. #define IDirectDrawSurface4_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  1871. #define IDirectDrawSurface4_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  1872. #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  1873. #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  1874. #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  1875. #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  1876. #define IDirectDrawSurface4_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  1877. #define IDirectDrawSurface4_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  1878. #define IDirectDrawSurface4_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  1879. #define IDirectDrawSurface4_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  1880. #define IDirectDrawSurface4_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  1881. #define IDirectDrawSurface4_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  1882. #define IDirectDrawSurface4_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  1883. #define IDirectDrawSurface4_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  1884. #define IDirectDrawSurface4_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  1885. #define IDirectDrawSurface4_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  1886. #define IDirectDrawSurface4_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  1887. #define IDirectDrawSurface4_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  1888. #define IDirectDrawSurface4_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  1889. #define IDirectDrawSurface4_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  1890. #define IDirectDrawSurface4_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  1891. #define IDirectDrawSurface4_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  1892. #define IDirectDrawSurface4_Restore(p)                   (p)->lpVtbl->Restore(p)
  1893. #define IDirectDrawSurface4_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  1894. #define IDirectDrawSurface4_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  1895. #define IDirectDrawSurface4_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  1896. #define IDirectDrawSurface4_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  1897. #define IDirectDrawSurface4_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  1898. #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  1899. #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  1900. #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  1901. #define IDirectDrawSurface4_GetDDInterface(p,a)          (p)->lpVtbl->GetDDInterface(p,a)
  1902. #define IDirectDrawSurface4_PageLock(p,a)                (p)->lpVtbl->PageLock(p,a)
  1903. #define IDirectDrawSurface4_PageUnlock(p,a)              (p)->lpVtbl->PageUnlock(p,a)
  1904. #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b)        (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  1905. #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d)    (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
  1906. #define IDirectDrawSurface4_GetPrivateData(p,a,b,c)      (p)->lpVtbl->GetPrivateData(p,a,b,c)
  1907. #define IDirectDrawSurface4_FreePrivateData(p,a)         (p)->lpVtbl->FreePrivateData(p,a)
  1908. #define IDirectDrawSurface4_GetUniquenessValue(p, a)     (p)->lpVtbl->GetUniquenessValue(p, a)
  1909. #define IDirectDrawSurface4_ChangeUniquenessValue(p)     (p)->lpVtbl->ChangeUniquenessValue(p)
  1910. #else
  1911. #define IDirectDrawSurface4_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  1912. #define IDirectDrawSurface4_AddRef(p)                    (p)->AddRef()
  1913. #define IDirectDrawSurface4_Release(p)                   (p)->Release()
  1914. #define IDirectDrawSurface4_AddAttachedSurface(p,a)      (p)->AddAttachedSurface(a)
  1915. #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a)     (p)->AddOverlayDirtyRect(a)
  1916. #define IDirectDrawSurface4_Blt(p,a,b,c,d,e)             (p)->Blt(a,b,c,d,e)
  1917. #define IDirectDrawSurface4_BltBatch(p,a,b,c)            (p)->BltBatch(a,b,c)
  1918. #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e)         (p)->BltFast(a,b,c,d,e)
  1919. #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  1920. #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b)  (p)->EnumAttachedSurfaces(a,b)
  1921. #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c)  (p)->EnumOverlayZOrders(a,b,c)
  1922. #define IDirectDrawSurface4_Flip(p,a,b)                  (p)->Flip(a,b)
  1923. #define IDirectDrawSurface4_GetAttachedSurface(p,a,b)    (p)->GetAttachedSurface(a,b)
  1924. #define IDirectDrawSurface4_GetBltStatus(p,a)            (p)->GetBltStatus(a)
  1925. #define IDirectDrawSurface4_GetCaps(p,b)                 (p)->GetCaps(b)
  1926. #define IDirectDrawSurface4_GetClipper(p,a)              (p)->GetClipper(a)
  1927. #define IDirectDrawSurface4_GetColorKey(p,a,b)           (p)->GetColorKey(a,b)
  1928. #define IDirectDrawSurface4_GetDC(p,a)                   (p)->GetDC(a)
  1929. #define IDirectDrawSurface4_GetFlipStatus(p,a)           (p)->GetFlipStatus(a)
  1930. #define IDirectDrawSurface4_GetOverlayPosition(p,a,b)    (p)->GetOverlayPosition(a,b)
  1931. #define IDirectDrawSurface4_GetPalette(p,a)              (p)->GetPalette(a)
  1932. #define IDirectDrawSurface4_GetPixelFormat(p,a)          (p)->GetPixelFormat(a)
  1933. #define IDirectDrawSurface4_GetSurfaceDesc(p,a)          (p)->GetSurfaceDesc(a)
  1934. #define IDirectDrawSurface4_Initialize(p,a,b)            (p)->Initialize(a,b)
  1935. #define IDirectDrawSurface4_IsLost(p)                    (p)->IsLost()
  1936. #define IDirectDrawSurface4_Lock(p,a,b,c,d)              (p)->Lock(a,b,c,d)
  1937. #define IDirectDrawSurface4_ReleaseDC(p,a)               (p)->ReleaseDC(a)
  1938. #define IDirectDrawSurface4_Restore(p)                   (p)->Restore()
  1939. #define IDirectDrawSurface4_SetClipper(p,a)              (p)->SetClipper(a)
  1940. #define IDirectDrawSurface4_SetColorKey(p,a,b)           (p)->SetColorKey(a,b)
  1941. #define IDirectDrawSurface4_SetOverlayPosition(p,a,b)    (p)->SetOverlayPosition(a,b)
  1942. #define IDirectDrawSurface4_SetPalette(p,a)              (p)->SetPalette(a)
  1943. #define IDirectDrawSurface4_Unlock(p,b)                  (p)->Unlock(b)
  1944. #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e)   (p)->UpdateOverlay(a,b,c,d,e)
  1945. #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a)    (p)->UpdateOverlayDisplay(a)
  1946. #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b)   (p)->UpdateOverlayZOrder(a,b)
  1947. #define IDirectDrawSurface4_GetDDInterface(p,a)          (p)->GetDDInterface(a)
  1948. #define IDirectDrawSurface4_PageLock(p,a)                (p)->PageLock(a)
  1949. #define IDirectDrawSurface4_PageUnlock(p,a)              (p)->PageUnlock(a)
  1950. #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b)        (p)->SetSurfaceDesc(a,b)
  1951. #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d)    (p)->SetPrivateData(a,b,c,d)
  1952. #define IDirectDrawSurface4_GetPrivateData(p,a,b,c)      (p)->GetPrivateData(a,b,c)
  1953. #define IDirectDrawSurface4_FreePrivateData(p,a)         (p)->FreePrivateData(a)
  1954. #define IDirectDrawSurface4_GetUniquenessValue(p, a)     (p)->GetUniquenessValue(a)
  1955. #define IDirectDrawSurface4_ChangeUniquenessValue(p)     (p)->ChangeUniquenessValue()
  1956. #endif
  1957.  
  1958. /*
  1959.  * IDirectDrawSurface7 and related interfaces
  1960.  */
  1961. #undef INTERFACE
  1962. #define INTERFACE IDirectDrawSurface7
  1963. DECLARE_INTERFACE_( IDirectDrawSurface7, IUnknown )
  1964. {
  1965.     /*** IUnknown methods ***/
  1966.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  1967.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  1968.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  1969.     /*** IDirectDrawSurface methods ***/
  1970.     STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE7) PURE;
  1971.     STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  1972.     STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE7, LPRECT,DWORD, LPDDBLTFX) PURE;
  1973.     STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  1974.     STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE7, LPRECT,DWORD) PURE;
  1975.     STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE7) PURE;
  1976.     STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK7) PURE;
  1977.     STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK7) PURE;
  1978.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE7, DWORD) PURE;
  1979.     STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE7 FAR *) PURE;
  1980.     STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  1981.     STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE;
  1982.     STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  1983.     STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1984.     STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  1985.     STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  1986.     STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  1987.     STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  1988.     STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  1989.     STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE;
  1990.     STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE;
  1991.     STDMETHOD(IsLost)(THIS) PURE;
  1992.     STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE;
  1993.     STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  1994.     STDMETHOD(Restore)(THIS) PURE;
  1995.     STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  1996.     STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  1997.     STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  1998.     STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  1999.     STDMETHOD(Unlock)(THIS_ LPRECT) PURE;
  2000.     STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE7,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  2001.     STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  2002.     STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE7) PURE;
  2003.     /*** Added in the v2 interface ***/
  2004.     STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
  2005.     STDMETHOD(PageLock)(THIS_ DWORD) PURE;
  2006.     STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
  2007.     /*** Added in the v3 interface ***/
  2008.     STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE;
  2009.     /*** Added in the v4 interface ***/
  2010.     STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE;
  2011.     STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE;
  2012.     STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
  2013.     STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE;
  2014.     STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
  2015.     /*** Moved Texture7 methods here ***/
  2016.     STDMETHOD(SetPriority)(THIS_ DWORD) PURE;
  2017.     STDMETHOD(GetPriority)(THIS_ LPDWORD) PURE;
  2018.     STDMETHOD(SetLOD)(THIS_ DWORD) PURE;
  2019.     STDMETHOD(GetLOD)(THIS_ LPDWORD) PURE;
  2020. };
  2021.  
  2022. #if !defined(__cplusplus) || defined(CINTERFACE)
  2023. #define IDirectDrawSurface7_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  2024. #define IDirectDrawSurface7_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  2025. #define IDirectDrawSurface7_Release(p)                   (p)->lpVtbl->Release(p)
  2026. #define IDirectDrawSurface7_AddAttachedSurface(p,a)      (p)->lpVtbl->AddAttachedSurface(p,a)
  2027. #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a)     (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  2028. #define IDirectDrawSurface7_Blt(p,a,b,c,d,e)             (p)->lpVtbl->Blt(p,a,b,c,d,e)
  2029. #define IDirectDrawSurface7_BltBatch(p,a,b,c)            (p)->lpVtbl->BltBatch(p,a,b,c)
  2030. #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e)         (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  2031. #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  2032. #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b)  (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  2033. #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c)  (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  2034. #define IDirectDrawSurface7_Flip(p,a,b)                  (p)->lpVtbl->Flip(p,a,b)
  2035. #define IDirectDrawSurface7_GetAttachedSurface(p,a,b)    (p)->lpVtbl->GetAttachedSurface(p,a,b)
  2036. #define IDirectDrawSurface7_GetBltStatus(p,a)            (p)->lpVtbl->GetBltStatus(p,a)
  2037. #define IDirectDrawSurface7_GetCaps(p,b)                 (p)->lpVtbl->GetCaps(p,b)
  2038. #define IDirectDrawSurface7_GetClipper(p,a)              (p)->lpVtbl->GetClipper(p,a)
  2039. #define IDirectDrawSurface7_GetColorKey(p,a,b)           (p)->lpVtbl->GetColorKey(p,a,b)
  2040. #define IDirectDrawSurface7_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
  2041. #define IDirectDrawSurface7_GetFlipStatus(p,a)           (p)->lpVtbl->GetFlipStatus(p,a)
  2042. #define IDirectDrawSurface7_GetOverlayPosition(p,a,b)    (p)->lpVtbl->GetOverlayPosition(p,a,b)
  2043. #define IDirectDrawSurface7_GetPalette(p,a)              (p)->lpVtbl->GetPalette(p,a)
  2044. #define IDirectDrawSurface7_GetPixelFormat(p,a)          (p)->lpVtbl->GetPixelFormat(p,a)
  2045. #define IDirectDrawSurface7_GetSurfaceDesc(p,a)          (p)->lpVtbl->GetSurfaceDesc(p,a)
  2046. #define IDirectDrawSurface7_Initialize(p,a,b)            (p)->lpVtbl->Initialize(p,a,b)
  2047. #define IDirectDrawSurface7_IsLost(p)                    (p)->lpVtbl->IsLost(p)
  2048. #define IDirectDrawSurface7_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
  2049. #define IDirectDrawSurface7_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
  2050. #define IDirectDrawSurface7_Restore(p)                   (p)->lpVtbl->Restore(p)
  2051. #define IDirectDrawSurface7_SetClipper(p,a)              (p)->lpVtbl->SetClipper(p,a)
  2052. #define IDirectDrawSurface7_SetColorKey(p,a,b)           (p)->lpVtbl->SetColorKey(p,a,b)
  2053. #define IDirectDrawSurface7_SetOverlayPosition(p,a,b)    (p)->lpVtbl->SetOverlayPosition(p,a,b)
  2054. #define IDirectDrawSurface7_SetPalette(p,a)              (p)->lpVtbl->SetPalette(p,a)
  2055. #define IDirectDrawSurface7_Unlock(p,b)                  (p)->lpVtbl->Unlock(p,b)
  2056. #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e)   (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  2057. #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a)    (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  2058. #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b)   (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  2059. #define IDirectDrawSurface7_GetDDInterface(p,a)          (p)->lpVtbl->GetDDInterface(p,a)
  2060. #define IDirectDrawSurface7_PageLock(p,a)                (p)->lpVtbl->PageLock(p,a)
  2061. #define IDirectDrawSurface7_PageUnlock(p,a)              (p)->lpVtbl->PageUnlock(p,a)
  2062. #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b)        (p)->lpVtbl->SetSurfaceDesc(p,a,b)
  2063. #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d)    (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
  2064. #define IDirectDrawSurface7_GetPrivateData(p,a,b,c)      (p)->lpVtbl->GetPrivateData(p,a,b,c)
  2065. #define IDirectDrawSurface7_FreePrivateData(p,a)         (p)->lpVtbl->FreePrivateData(p,a)
  2066. #define IDirectDrawSurface7_GetUniquenessValue(p, a)     (p)->lpVtbl->GetUniquenessValue(p, a)
  2067. #define IDirectDrawSurface7_ChangeUniquenessValue(p)     (p)->lpVtbl->ChangeUniquenessValue(p)
  2068. #define IDirectDrawSurface7_SetPriority(p,a)             (p)->lpVtbl->SetPriority(p,a)
  2069. #define IDirectDrawSurface7_GetPriority(p,a)             (p)->lpVtbl->GetPriority(p,a)
  2070. #define IDirectDrawSurface7_SetLOD(p,a)                  (p)->lpVtbl->SetLOD(p,a)
  2071. #define IDirectDrawSurface7_GetLOD(p,a)                  (p)->lpVtbl->GetLOD(p,a)
  2072. #else
  2073. #define IDirectDrawSurface7_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  2074. #define IDirectDrawSurface7_AddRef(p)                    (p)->AddRef()
  2075. #define IDirectDrawSurface7_Release(p)                   (p)->Release()
  2076. #define IDirectDrawSurface7_AddAttachedSurface(p,a)      (p)->AddAttachedSurface(a)
  2077. #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a)     (p)->AddOverlayDirtyRect(a)
  2078. #define IDirectDrawSurface7_Blt(p,a,b,c,d,e)             (p)->Blt(a,b,c,d,e)
  2079. #define IDirectDrawSurface7_BltBatch(p,a,b,c)            (p)->BltBatch(a,b,c)
  2080. #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e)         (p)->BltFast(a,b,c,d,e)
  2081. #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
  2082. #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b)  (p)->EnumAttachedSurfaces(a,b)
  2083. #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c)  (p)->EnumOverlayZOrders(a,b,c)
  2084. #define IDirectDrawSurface7_Flip(p,a,b)                  (p)->Flip(a,b)
  2085. #define IDirectDrawSurface7_GetAttachedSurface(p,a,b)    (p)->GetAttachedSurface(a,b)
  2086. #define IDirectDrawSurface7_GetBltStatus(p,a)            (p)->GetBltStatus(a)
  2087. #define IDirectDrawSurface7_GetCaps(p,b)                 (p)->GetCaps(b)
  2088. #define IDirectDrawSurface7_GetClipper(p,a)              (p)->GetClipper(a)
  2089. #define IDirectDrawSurface7_GetColorKey(p,a,b)           (p)->GetColorKey(a,b)
  2090. #define IDirectDrawSurface7_GetDC(p,a)                   (p)->GetDC(a)
  2091. #define IDirectDrawSurface7_GetFlipStatus(p,a)           (p)->GetFlipStatus(a)
  2092. #define IDirectDrawSurface7_GetOverlayPosition(p,a,b)    (p)->GetOverlayPosition(a,b)
  2093. #define IDirectDrawSurface7_GetPalette(p,a)              (p)->GetPalette(a)
  2094. #define IDirectDrawSurface7_GetPixelFormat(p,a)          (p)->GetPixelFormat(a)
  2095. #define IDirectDrawSurface7_GetSurfaceDesc(p,a)          (p)->GetSurfaceDesc(a)
  2096. #define IDirectDrawSurface7_Initialize(p,a,b)            (p)->Initialize(a,b)
  2097. #define IDirectDrawSurface7_IsLost(p)                    (p)->IsLost()
  2098. #define IDirectDrawSurface7_Lock(p,a,b,c,d)              (p)->Lock(a,b,c,d)
  2099. #define IDirectDrawSurface7_ReleaseDC(p,a)               (p)->ReleaseDC(a)
  2100. #define IDirectDrawSurface7_Restore(p)                   (p)->Restore()
  2101. #define IDirectDrawSurface7_SetClipper(p,a)              (p)->SetClipper(a)
  2102. #define IDirectDrawSurface7_SetColorKey(p,a,b)           (p)->SetColorKey(a,b)
  2103. #define IDirectDrawSurface7_SetOverlayPosition(p,a,b)    (p)->SetOverlayPosition(a,b)
  2104. #define IDirectDrawSurface7_SetPalette(p,a)              (p)->SetPalette(a)
  2105. #define IDirectDrawSurface7_Unlock(p,b)                  (p)->Unlock(b)
  2106. #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e)   (p)->UpdateOverlay(a,b,c,d,e)
  2107. #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a)    (p)->UpdateOverlayDisplay(a)
  2108. #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b)   (p)->UpdateOverlayZOrder(a,b)
  2109. #define IDirectDrawSurface7_GetDDInterface(p,a)          (p)->GetDDInterface(a)
  2110. #define IDirectDrawSurface7_PageLock(p,a)                (p)->PageLock(a)
  2111. #define IDirectDrawSurface7_PageUnlock(p,a)              (p)->PageUnlock(a)
  2112. #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b)        (p)->SetSurfaceDesc(a,b)
  2113. #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d)    (p)->SetPrivateData(a,b,c,d)
  2114. #define IDirectDrawSurface7_GetPrivateData(p,a,b,c)      (p)->GetPrivateData(a,b,c)
  2115. #define IDirectDrawSurface7_FreePrivateData(p,a)         (p)->FreePrivateData(a)
  2116. #define IDirectDrawSurface7_GetUniquenessValue(p, a)     (p)->GetUniquenessValue(a)
  2117. #define IDirectDrawSurface7_ChangeUniquenessValue(p)     (p)->ChangeUniquenessValue()
  2118. #define IDirectDrawSurface7_SetPriority(p,a)             (p)->SetPriority(a)
  2119. #define IDirectDrawSurface7_GetPriority(p,a)             (p)->GetPriority(a)
  2120. #define IDirectDrawSurface7_SetLOD(p,a)                  (p)->SetLOD(a)
  2121. #define IDirectDrawSurface7_GetLOD(p,a)                  (p)->GetLOD(a)
  2122. #endif
  2123.  
  2124.  
  2125.  
  2126. /*
  2127.  * IDirectDrawColorControl
  2128.  */
  2129. #if defined( _WIN32 ) && !defined( _NO_COM )
  2130. #undef INTERFACE
  2131. #define INTERFACE IDirectDrawColorControl
  2132. DECLARE_INTERFACE_( IDirectDrawColorControl, IUnknown )
  2133. {
  2134.     /*** IUnknown methods ***/
  2135.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2136.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  2137.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  2138.     /*** IDirectDrawColorControl methods ***/
  2139.     STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  2140.     STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  2141. };
  2142.  
  2143. #if !defined(__cplusplus) || defined(CINTERFACE)
  2144. #define IDirectDrawColorControl_QueryInterface(p, a, b)  (p)->lpVtbl->QueryInterface(p, a, b)
  2145. #define IDirectDrawColorControl_AddRef(p)                (p)->lpVtbl->AddRef(p)
  2146. #define IDirectDrawColorControl_Release(p)               (p)->lpVtbl->Release(p)
  2147. #define IDirectDrawColorControl_GetColorControls(p, a)   (p)->lpVtbl->GetColorControls(p, a)
  2148. #define IDirectDrawColorControl_SetColorControls(p, a)   (p)->lpVtbl->SetColorControls(p, a)
  2149. #else
  2150. #define IDirectDrawColorControl_QueryInterface(p, a, b)  (p)->QueryInterface(a, b)
  2151. #define IDirectDrawColorControl_AddRef(p)                (p)->AddRef()
  2152. #define IDirectDrawColorControl_Release(p)               (p)->Release()
  2153. #define IDirectDrawColorControl_GetColorControls(p, a)   (p)->GetColorControls(a)
  2154. #define IDirectDrawColorControl_SetColorControls(p, a)   (p)->SetColorControls(a)
  2155. #endif
  2156.  
  2157. #endif
  2158.  
  2159.  
  2160. /*
  2161.  * IDirectDrawGammaControl
  2162.  */
  2163. #if defined( _WIN32 ) && !defined( _NO_COM )
  2164. #undef INTERFACE
  2165. #define INTERFACE IDirectDrawGammaControl
  2166. DECLARE_INTERFACE_( IDirectDrawGammaControl, IUnknown )
  2167. {
  2168.     /*** IUnknown methods ***/
  2169.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  2170.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  2171.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  2172.     /*** IDirectDrawGammaControl methods ***/
  2173.     STDMETHOD(GetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
  2174.     STDMETHOD(SetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
  2175. };
  2176.  
  2177. #if !defined(__cplusplus) || defined(CINTERFACE)
  2178. #define IDirectDrawGammaControl_QueryInterface(p, a, b)  (p)->lpVtbl->QueryInterface(p, a, b)
  2179. #define IDirectDrawGammaControl_AddRef(p)                (p)->lpVtbl->AddRef(p)
  2180. #define IDirectDrawGammaControl_Release(p)               (p)->lpVtbl->Release(p)
  2181. #define IDirectDrawGammaControl_GetGammaRamp(p, a, b)    (p)->lpVtbl->GetGammaRamp(p, a, b)
  2182. #define IDirectDrawGammaControl_SetGammaRamp(p, a, b)    (p)->lpVtbl->SetGammaRamp(p, a, b)
  2183. #else
  2184. #define IDirectDrawGammaControl_QueryInterface(p, a, b)  (p)->QueryInterface(a, b)
  2185. #define IDirectDrawGammaControl_AddRef(p)                (p)->AddRef()
  2186. #define IDirectDrawGammaControl_Release(p)               (p)->Release()
  2187. #define IDirectDrawGammaControl_GetGammaRamp(p, a, b)    (p)->GetGammaRamp(a, b)
  2188. #define IDirectDrawGammaControl_SetGammaRamp(p, a, b)    (p)->SetGammaRamp(a, b)
  2189. #endif
  2190.  
  2191. #endif
  2192.  
  2193.  
  2194.  
  2195. #endif
  2196.  
  2197.  
  2198. /*
  2199.  * DDSURFACEDESC
  2200.  */
  2201. typedef struct _DDSURFACEDESC
  2202. {
  2203.     DWORD               dwSize;                 // size of the DDSURFACEDESC structure
  2204.     DWORD               dwFlags;                // determines what fields are valid
  2205.     DWORD               dwHeight;               // height of surface to be created
  2206.     DWORD               dwWidth;                // width of input surface
  2207.     union
  2208.     {
  2209.         LONG            lPitch;                 // distance to start of next line (return value only)
  2210.         DWORD           dwLinearSize;           // Formless late-allocated optimized surface size
  2211.     } DUMMYUNIONNAMEN(1);
  2212.     DWORD               dwBackBufferCount;      // number of back buffers requested
  2213.     union
  2214.     {
  2215.         DWORD           dwMipMapCount;          // number of mip-map levels requested
  2216.         DWORD           dwZBufferBitDepth;      // depth of Z buffer requested
  2217.         DWORD           dwRefreshRate;          // refresh rate (used when display mode is described)
  2218.     } DUMMYUNIONNAMEN(2);
  2219.     DWORD               dwAlphaBitDepth;        // depth of alpha buffer requested
  2220.     DWORD               dwReserved;             // reserved
  2221.     LPVOID              lpSurface;              // pointer to the associated surface memory
  2222.     DDCOLORKEY          ddckCKDestOverlay;      // color key for destination overlay use
  2223.     DDCOLORKEY          ddckCKDestBlt;          // color key for destination blt use
  2224.     DDCOLORKEY          ddckCKSrcOverlay;       // color key for source overlay use
  2225.     DDCOLORKEY          ddckCKSrcBlt;           // color key for source blt use
  2226.     DDPIXELFORMAT       ddpfPixelFormat;        // pixel format description of the surface
  2227.     DDSCAPS             ddsCaps;                // direct draw surface capabilities
  2228. } DDSURFACEDESC;
  2229.  
  2230. /*
  2231.  * DDSURFACEDESC2
  2232.  */
  2233. typedef struct _DDSURFACEDESC2
  2234. {
  2235.     DWORD               dwSize;                 // size of the DDSURFACEDESC structure
  2236.     DWORD               dwFlags;                // determines what fields are valid
  2237.     DWORD               dwHeight;               // height of surface to be created
  2238.     DWORD               dwWidth;                // width of input surface
  2239.     union
  2240.     {
  2241.         LONG            lPitch;                 // distance to start of next line (return value only)
  2242.         DWORD           dwLinearSize;           // Formless late-allocated optimized surface size
  2243.     } DUMMYUNIONNAMEN(1);
  2244.     DWORD               dwBackBufferCount;      // number of back buffers requested
  2245.     union
  2246.     {
  2247.         DWORD           dwMipMapCount;          // number of mip-map levels requestde
  2248.                                                 // dwZBufferBitDepth removed, use ddpfPixelFormat one instead
  2249.         DWORD           dwRefreshRate;          // refresh rate (used when display mode is described)
  2250.         DWORD           dwSrcVBHandle;          // The source used in VB::Optimize
  2251.     } DUMMYUNIONNAMEN(2);
  2252.     DWORD               dwAlphaBitDepth;        // depth of alpha buffer requested
  2253.     DWORD               dwReserved;             // reserved
  2254.     LPVOID              lpSurface;              // pointer to the associated surface memory
  2255.     union
  2256.     {
  2257.         DDCOLORKEY      ddckCKDestOverlay;      // color key for destination overlay use
  2258.         DWORD           dwEmptyFaceColor;       // Physical color for empty cubemap faces
  2259.     } DUMMYUNIONNAMEN(3);
  2260.     DDCOLORKEY          ddckCKDestBlt;          // color key for destination blt use
  2261.     DDCOLORKEY          ddckCKSrcOverlay;       // color key for source overlay use
  2262.     DDCOLORKEY          ddckCKSrcBlt;           // color key for source blt use
  2263.     union
  2264.     {
  2265.         DDPIXELFORMAT   ddpfPixelFormat;        // pixel format description of the surface
  2266.         DWORD           dwFVF;                  // vertex format description of vertex buffers
  2267.     } DUMMYUNIONNAMEN(4);
  2268.     DDSCAPS2            ddsCaps;                // direct draw surface capabilities
  2269.     DWORD               dwTextureStage;         // stage in multitexture cascade
  2270. } DDSURFACEDESC2;
  2271.  
  2272. /*
  2273.  * ddsCaps field is valid.
  2274.  */
  2275. #define DDSD_CAPS               0x00000001l     // default
  2276.  
  2277. /*
  2278.  * dwHeight field is valid.
  2279.  */
  2280. #define DDSD_HEIGHT             0x00000002l
  2281.  
  2282. /*
  2283.  * dwWidth field is valid.
  2284.  */
  2285. #define DDSD_WIDTH              0x00000004l
  2286.  
  2287. /*
  2288.  * lPitch is valid.
  2289.  */
  2290. #define DDSD_PITCH              0x00000008l
  2291.  
  2292. /*
  2293.  * dwBackBufferCount is valid.
  2294.  */
  2295. #define DDSD_BACKBUFFERCOUNT    0x00000020l
  2296.  
  2297. /*
  2298.  * dwZBufferBitDepth is valid.  (shouldnt be used in DDSURFACEDESC2)
  2299.  */
  2300. #define DDSD_ZBUFFERBITDEPTH    0x00000040l
  2301.  
  2302. /*
  2303.  * dwAlphaBitDepth is valid.
  2304.  */
  2305. #define DDSD_ALPHABITDEPTH      0x00000080l
  2306.  
  2307.  
  2308. /*
  2309.  * lpSurface is valid.
  2310.  */
  2311. #define DDSD_LPSURFACE          0x00000800l
  2312.  
  2313. /*
  2314.  * ddpfPixelFormat is valid.
  2315.  */
  2316. #define DDSD_PIXELFORMAT        0x00001000l
  2317.  
  2318. /*
  2319.  * ddckCKDestOverlay is valid.
  2320.  */
  2321. #define DDSD_CKDESTOVERLAY      0x00002000l
  2322.  
  2323. /*
  2324.  * ddckCKDestBlt is valid.
  2325.  */
  2326. #define DDSD_CKDESTBLT          0x00004000l
  2327.  
  2328. /*
  2329.  * ddckCKSrcOverlay is valid.
  2330.  */
  2331. #define DDSD_CKSRCOVERLAY       0x00008000l
  2332.  
  2333. /*
  2334.  * ddckCKSrcBlt is valid.
  2335.  */
  2336. #define DDSD_CKSRCBLT           0x00010000l
  2337.  
  2338. /*
  2339.  * dwMipMapCount is valid.
  2340.  */
  2341. #define DDSD_MIPMAPCOUNT        0x00020000l
  2342.  
  2343.  /*
  2344.   * dwRefreshRate is valid
  2345.   */
  2346. #define DDSD_REFRESHRATE        0x00040000l
  2347.  
  2348. /*
  2349.  * dwLinearSize is valid
  2350.  */
  2351. #define DDSD_LINEARSIZE         0x00080000l
  2352.  
  2353. /*
  2354.  * dwTextureStage is valid
  2355.  */
  2356. #define DDSD_TEXTURESTAGE       0x00100000l
  2357. /*
  2358.  * dwFVF is valid
  2359.  */
  2360. #define DDSD_FVF                0x00200000l
  2361. /*
  2362.  * dwSrcVBHandle is valid
  2363.  */
  2364. #define DDSD_SRCVBHANDLE        0x00400000l
  2365. /*
  2366.  * All input fields are valid.
  2367.  */
  2368. #define DDSD_ALL                0x007ff9eel
  2369.  
  2370.  
  2371. /*
  2372.  * DDOPTSURFACEDESC
  2373.  */
  2374. typedef struct _DDOPTSURFACEDESC
  2375. {
  2376.     DWORD       dwSize;             // size of the DDOPTSURFACEDESC structure
  2377.     DWORD       dwFlags;            // determines what fields are valid
  2378.     DDSCAPS2    ddSCaps;            // Common caps like: Memory type
  2379.     DDOSCAPS    ddOSCaps;           // Common caps like: Memory type
  2380.     GUID        guid;               // Compression technique GUID
  2381.     DWORD       dwCompressionRatio; // Compression ratio
  2382. } DDOPTSURFACEDESC;
  2383.  
  2384. /*
  2385.  * guid field is valid.
  2386.  */
  2387. #define DDOSD_GUID                  0x00000001l
  2388.  
  2389. /*
  2390.  * dwCompressionRatio field is valid.
  2391.  */
  2392. #define DDOSD_COMPRESSION_RATIO     0x00000002l
  2393.  
  2394. /*
  2395.  * ddSCaps field is valid.
  2396.  */
  2397. #define DDOSD_SCAPS                 0x00000004l
  2398.  
  2399. /*
  2400.  * ddOSCaps field is valid.
  2401.  */
  2402. #define DDOSD_OSCAPS                0x00000008l
  2403.  
  2404. /*
  2405.  * All input fields are valid.
  2406.  */
  2407. #define DDOSD_ALL                   0x0000000fl
  2408.  
  2409. /*
  2410.  * The surface's optimized pixelformat is compressed
  2411.  */
  2412. #define DDOSDCAPS_OPTCOMPRESSED                 0x00000001l
  2413.  
  2414. /*
  2415.  * The surface's optimized pixelformat is reordered
  2416.  */
  2417. #define DDOSDCAPS_OPTREORDERED                  0x00000002l
  2418.  
  2419. /*
  2420.  * The opt surface is a monolithic mipmap
  2421.  */
  2422. #define DDOSDCAPS_MONOLITHICMIPMAP              0x00000004l
  2423.  
  2424. /*
  2425.  * The valid Surf caps:
  2426.  * #define DDSCAPS_SYSTEMMEMORY                 0x00000800l
  2427.  * #define DDSCAPS_VIDEOMEMORY          0x00004000l
  2428.  * #define DDSCAPS_LOCALVIDMEM          0x10000000l
  2429.  * #define DDSCAPS_NONLOCALVIDMEM       0x20000000l
  2430.  */
  2431. #define DDOSDCAPS_VALIDSCAPS            0x30004800l
  2432.  
  2433. /*
  2434.  * The valid OptSurf caps
  2435.  */
  2436. #define DDOSDCAPS_VALIDOSCAPS           0x00000007l
  2437.  
  2438.  
  2439. /*
  2440.  * DDCOLORCONTROL
  2441.  */
  2442. typedef struct _DDCOLORCONTROL
  2443. {
  2444.     DWORD               dwSize;
  2445.     DWORD               dwFlags;
  2446.     LONG                lBrightness;
  2447.     LONG                lContrast;
  2448.     LONG                lHue;
  2449.     LONG                lSaturation;
  2450.     LONG                lSharpness;
  2451.     LONG                lGamma;
  2452.     LONG                lColorEnable;
  2453.     DWORD               dwReserved1;
  2454. } DDCOLORCONTROL;
  2455.  
  2456.  
  2457. /*
  2458.  * lBrightness field is valid.
  2459.  */
  2460. #define DDCOLOR_BRIGHTNESS              0x00000001l
  2461.  
  2462. /*
  2463.  * lContrast field is valid.
  2464.  */
  2465. #define DDCOLOR_CONTRAST                0x00000002l
  2466.  
  2467. /*
  2468.  * lHue field is valid.
  2469.  */
  2470. #define DDCOLOR_HUE                     0x00000004l
  2471.  
  2472. /*
  2473.  * lSaturation field is valid.
  2474.  */
  2475. #define DDCOLOR_SATURATION              0x00000008l
  2476.  
  2477. /*
  2478.  * lSharpness field is valid.
  2479.  */
  2480. #define DDCOLOR_SHARPNESS               0x00000010l
  2481.  
  2482. /*
  2483.  * lGamma field is valid.
  2484.  */
  2485. #define DDCOLOR_GAMMA                   0x00000020l
  2486.  
  2487. /*
  2488.  * lColorEnable field is valid.
  2489.  */
  2490. #define DDCOLOR_COLORENABLE             0x00000040l
  2491.  
  2492.  
  2493.  
  2494. /*============================================================================
  2495.  *
  2496.  * Direct Draw Capability Flags
  2497.  *
  2498.  * These flags are used to describe the capabilities of a given Surface.
  2499.  * All flags are bit flags.
  2500.  *
  2501.  *==========================================================================*/
  2502.  
  2503. /****************************************************************************
  2504.  *
  2505.  * DIRECTDRAWSURFACE CAPABILITY FLAGS
  2506.  *
  2507.  ****************************************************************************/
  2508.  
  2509. /*
  2510.  * This bit is reserved. It should not be specified.
  2511.  */
  2512. #define DDSCAPS_RESERVED1                       0x00000001l
  2513.  
  2514. /*
  2515.  * Indicates that this surface contains alpha-only information.
  2516.  * (To determine if a surface is RGBA/YUVA, the pixel format must be
  2517.  * interrogated.)
  2518.  */
  2519. #define DDSCAPS_ALPHA                           0x00000002l
  2520.  
  2521. /*
  2522.  * Indicates that this surface is a backbuffer.  It is generally
  2523.  * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
  2524.  * It indicates that this surface is THE back buffer of a surface
  2525.  * flipping structure.  DirectDraw supports N surfaces in a
  2526.  * surface flipping structure.  Only the surface that immediately
  2527.  * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
  2528.  * The other surfaces are identified as back buffers by the presence
  2529.  * of the DDSCAPS_FLIP capability, their attachment order, and the
  2530.  * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
  2531.  * capabilities.  The bit is sent to CreateSurface when a standalone
  2532.  * back buffer is being created.  This surface could be attached to
  2533.  * a front buffer and/or back buffers to form a flipping surface
  2534.  * structure after the CreateSurface call.  See AddAttachments for
  2535.  * a detailed description of the behaviors in this case.
  2536.  */
  2537. #define DDSCAPS_BACKBUFFER                      0x00000004l
  2538.  
  2539. /*
  2540.  * Indicates a complex surface structure is being described.  A
  2541.  * complex surface structure results in the creation of more than
  2542.  * one surface.  The additional surfaces are attached to the root
  2543.  * surface.  The complex structure can only be destroyed by
  2544.  * destroying the root.
  2545.  */
  2546. #define DDSCAPS_COMPLEX                         0x00000008l
  2547.  
  2548. /*
  2549.  * Indicates that this surface is a part of a surface flipping structure.
  2550.  * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
  2551.  * DDSCAP_BACKBUFFER bits are not set.  They are set by CreateSurface
  2552.  * on the resulting creations.  The dwBackBufferCount field in the
  2553.  * DDSURFACEDESC structure must be set to at least 1 in order for
  2554.  * the CreateSurface call to succeed.  The DDSCAPS_COMPLEX capability
  2555.  * must always be set with creating multiple surfaces through CreateSurface.
  2556.  */
  2557. #define DDSCAPS_FLIP                            0x00000010l
  2558.  
  2559. /*
  2560.  * Indicates that this surface is THE front buffer of a surface flipping
  2561.  * structure.  It is generally set by CreateSurface when the DDSCAPS_FLIP
  2562.  * capability bit is set.
  2563.  * If this capability is sent to CreateSurface then a standalonw front buffer
  2564.  * is created.  This surface will not have the DDSCAPS_FLIP capability.
  2565.  * It can be attached to other back buffers to form a flipping structure.
  2566.  * See AddAttachments for a detailed description of the behaviors in this
  2567.  * case.
  2568.  */
  2569. #define DDSCAPS_FRONTBUFFER                     0x00000020l
  2570.  
  2571. /*
  2572.  * Indicates that this surface is any offscreen surface that is not an overlay,
  2573.  * texture, zbuffer, front buffer, back buffer, or alpha surface.  It is used
  2574.  * to identify plain vanilla surfaces.
  2575.  */
  2576. #define DDSCAPS_OFFSCREENPLAIN                  0x00000040l
  2577.  
  2578. /*
  2579.  * Indicates that this surface is an overlay.  It may or may not be directly visible
  2580.  * depending on whether or not it is currently being overlayed onto the primary
  2581.  * surface.  DDSCAPS_VISIBLE can be used to determine whether or not it is being
  2582.  * overlayed at the moment.
  2583.  */
  2584. #define DDSCAPS_OVERLAY                         0x00000080l
  2585.  
  2586. /*
  2587.  * Indicates that unique DirectDrawPalette objects can be created and
  2588.  * attached to this surface.
  2589.  */
  2590. #define DDSCAPS_PALETTE                         0x00000100l
  2591.  
  2592. /*
  2593.  * Indicates that this surface is the primary surface.  The primary
  2594.  * surface represents what the user is seeing at the moment.
  2595.  */
  2596. #define DDSCAPS_PRIMARYSURFACE                  0x00000200l
  2597.  
  2598.  
  2599. /*
  2600.  * This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now
  2601.  * obsolete.
  2602.  */
  2603. #define DDSCAPS_RESERVED3               0x00000400l
  2604.  
  2605. /*
  2606.  * Indicates that this surface memory was allocated in system memory
  2607.  */
  2608. #define DDSCAPS_SYSTEMMEMORY                    0x00000800l
  2609.  
  2610. /*
  2611.  * Indicates that this surface can be used as a 3D texture.  It does not
  2612.  * indicate whether or not the surface is being used for that purpose.
  2613.  */
  2614. #define DDSCAPS_TEXTURE                         0x00001000l
  2615.  
  2616. /*
  2617.  * Indicates that a surface may be a destination for 3D rendering.  This
  2618.  * bit must be set in order to query for a Direct3D Device Interface
  2619.  * from this surface.
  2620.  */
  2621. #define DDSCAPS_3DDEVICE                        0x00002000l
  2622.  
  2623. /*
  2624.  * Indicates that this surface exists in video memory.
  2625.  */
  2626. #define DDSCAPS_VIDEOMEMORY                     0x00004000l
  2627.  
  2628. /*
  2629.  * Indicates that changes made to this surface are immediately visible.
  2630.  * It is always set for the primary surface and is set for overlays while
  2631.  * they are being overlayed and texture maps while they are being textured.
  2632.  */
  2633. #define DDSCAPS_VISIBLE                         0x00008000l
  2634.  
  2635. /*
  2636.  * Indicates that only writes are permitted to the surface.  Read accesses
  2637.  * from the surface may or may not generate a protection fault, but the
  2638.  * results of a read from this surface will not be meaningful.  READ ONLY.
  2639.  */
  2640. #define DDSCAPS_WRITEONLY                       0x00010000l
  2641.  
  2642. /*
  2643.  * Indicates that this surface is a z buffer. A z buffer does not contain
  2644.  * displayable information.  Instead it contains bit depth information that is
  2645.  * used to determine which pixels are visible and which are obscured.
  2646.  */
  2647. #define DDSCAPS_ZBUFFER                         0x00020000l
  2648.  
  2649. /*
  2650.  * Indicates surface will have a DC associated long term
  2651.  */
  2652. #define DDSCAPS_OWNDC                           0x00040000l
  2653.  
  2654. /*
  2655.  * Indicates surface should be able to receive live video
  2656.  */
  2657. #define DDSCAPS_LIVEVIDEO                       0x00080000l
  2658.  
  2659. /*
  2660.  * Indicates surface should be able to have a stream decompressed
  2661.  * to it by the hardware.
  2662.  */
  2663. #define DDSCAPS_HWCODEC                         0x00100000l
  2664.  
  2665. /*
  2666.  * Surface is a ModeX surface.
  2667.  *
  2668.  */
  2669. #define DDSCAPS_MODEX                           0x00200000l
  2670.  
  2671. /*
  2672.  * Indicates surface is one level of a mip-map. This surface will
  2673.  * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
  2674.  * This can be done explicitly, by creating a number of surfaces and
  2675.  * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
  2676.  * If this bit is set then DDSCAPS_TEXTURE must also be set.
  2677.  */
  2678. #define DDSCAPS_MIPMAP                          0x00400000l
  2679.  
  2680. /*
  2681.  * This bit is reserved. It should not be specified.
  2682.  */
  2683. #define DDSCAPS_RESERVED2                       0x00800000l
  2684.  
  2685.  
  2686. /*
  2687.  * Indicates that memory for the surface is not allocated until the surface
  2688.  * is loaded (via the Direct3D texture Load() function).
  2689.  */
  2690. #define DDSCAPS_ALLOCONLOAD                     0x04000000l
  2691.  
  2692. /*
  2693.  * Indicates that the surface will recieve data from a video port.
  2694.  */
  2695. #define DDSCAPS_VIDEOPORT                       0x08000000l
  2696.  
  2697. /*
  2698.  * Indicates that a video memory surface is resident in true, local video
  2699.  * memory rather than non-local video memory. If this flag is specified then
  2700.  * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
  2701.  * DDSCAPS_NONLOCALVIDMEM.
  2702.  */
  2703. #define DDSCAPS_LOCALVIDMEM                     0x10000000l
  2704.  
  2705. /*
  2706.  * Indicates that a video memory surface is resident in non-local video
  2707.  * memory rather than true, local video memory. If this flag is specified
  2708.  * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
  2709.  * DDSCAPS_LOCALVIDMEM.
  2710.  */
  2711. #define DDSCAPS_NONLOCALVIDMEM                  0x20000000l
  2712.  
  2713. /*
  2714.  * Indicates that this surface is a standard VGA mode surface, and not a
  2715.  * ModeX surface. (This flag will never be set in combination with the
  2716.  * DDSCAPS_MODEX flag).
  2717.  */
  2718. #define DDSCAPS_STANDARDVGAMODE                 0x40000000l
  2719.  
  2720. /*
  2721.  * Indicates that this surface will be an optimized surface. This flag is
  2722.  * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
  2723.  * will be created without any underlying video memory until loaded.
  2724.  */
  2725. #define DDSCAPS_OPTIMIZED                       0x80000000l
  2726.  
  2727.  
  2728.  
  2729.  
  2730. /*
  2731.  * Indicates that this surface will receive data from a video port using
  2732.  * the de-interlacing hardware.  This allows the driver to allocate memory
  2733.  * for any extra buffers that may be required.  The DDSCAPS_VIDEOPORT and
  2734.  * DDSCAPS_OVERLAY flags must also be set.
  2735.  */
  2736. #define DDSCAPS2_HARDWAREDEINTERLACE            0x00000002L
  2737.  
  2738. /*
  2739.  * Indicates to the driver that this surface will be locked very frequently
  2740.  * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap
  2741.  * set must also have DDSCAPS_TEXTURE. This cap cannot be used with
  2742.  * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE.
  2743.  */
  2744. #define DDSCAPS2_HINTDYNAMIC                    0x00000004L
  2745.  
  2746. /*
  2747.  * Indicates to the driver that this surface can be re-ordered/retiled on
  2748.  * load. This operation will not change the size of the texture. It is
  2749.  * relatively fast and symmetrical, since the application may lock these
  2750.  * bits (although it will take a performance hit when doing so). Surfaces
  2751.  * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be
  2752.  * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE.
  2753.  */
  2754. #define DDSCAPS2_HINTSTATIC                     0x00000008L
  2755.  
  2756. /*
  2757.  * Indicates that the client would like this texture surface to be managed by the
  2758.  * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have
  2759.  * DDSCAPS_TEXTURE set.
  2760.  */
  2761. #define DDSCAPS2_TEXTUREMANAGE                  0x00000010L
  2762.  
  2763. /*
  2764.  * These bits are reserved for internal use */
  2765. #define DDSCAPS2_RESERVED1                      0x00000020L
  2766. #define DDSCAPS2_RESERVED2                      0x00000040L
  2767.  
  2768. /*
  2769.  * Indicates to the driver that this surface will never be locked again.
  2770.  * The driver is free to optimize this surface via retiling and actual compression.
  2771.  * All calls to Lock() or Blts from this surface will fail. Surfaces with this
  2772.  * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with
  2773.  * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC.
  2774.  */
  2775. #define DDSCAPS2_OPAQUE                         0x00000080L
  2776.  
  2777. /*
  2778.  * Applications should set this bit at CreateSurface time to indicate that they
  2779.  * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set.
  2780.  */
  2781. #define DDSCAPS2_HINTANTIALIASING               0x00000100L
  2782.  
  2783.  
  2784. /*
  2785.  * This flag is used at CreateSurface time to indicate that this set of
  2786.  * surfaces is a cubic environment map
  2787.  */
  2788. #define DDSCAPS2_CUBEMAP                        0x00000200L
  2789.  
  2790. /*
  2791.  * These flags preform two functions:
  2792.  * - At CreateSurface time, they define which of the six cube faces are
  2793.  *   required by the application.
  2794.  * - After creation, each face in the cubemap will have exactly one of these
  2795.  *   bits set.
  2796.  */
  2797. #define DDSCAPS2_CUBEMAP_POSITIVEX              0x00000400L
  2798. #define DDSCAPS2_CUBEMAP_NEGATIVEX              0x00000800L
  2799. #define DDSCAPS2_CUBEMAP_POSITIVEY              0x00001000L
  2800. #define DDSCAPS2_CUBEMAP_NEGATIVEY              0x00002000L
  2801. #define DDSCAPS2_CUBEMAP_POSITIVEZ              0x00004000L
  2802. #define DDSCAPS2_CUBEMAP_NEGATIVEZ              0x00008000L
  2803.  
  2804. /*
  2805.  * This macro may be used to specify all faces of a cube map at CreateSurface time
  2806.  */
  2807. #define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
  2808.                                     DDSCAPS2_CUBEMAP_NEGATIVEX |\
  2809.                                     DDSCAPS2_CUBEMAP_POSITIVEY |\
  2810.                                     DDSCAPS2_CUBEMAP_NEGATIVEY |\
  2811.                                     DDSCAPS2_CUBEMAP_POSITIVEZ |\
  2812.                                     DDSCAPS2_CUBEMAP_NEGATIVEZ )
  2813.  
  2814.  
  2815. /*
  2816.  * This flag is an additional flag which is present on mipmap sublevels from DX7 onwards
  2817.  * It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface
  2818.  * constructs such as Cube Maps, wherein there are more than one mipmap surface attached
  2819.  * to the root surface.
  2820.  * This caps bit is ignored by CreateSurface
  2821.  */
  2822. #define DDSCAPS2_MIPMAPSUBLEVEL                 0x00010000L
  2823.  
  2824. /* This flag indicates that the texture should be managed by D3D only */
  2825. #define DDSCAPS2_D3DTEXTUREMANAGE               0x00020000L
  2826.  
  2827. /* This flag indicates that the managed surface can be safely lost */
  2828. #define DDSCAPS2_DONOTPERSIST                   0x00040000L
  2829.  
  2830. /* indicates that this surface is part of a stereo flipping chain */
  2831. #define DDSCAPS2_STEREOSURFACELEFT              0x00080000L
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  /****************************************************************************
  2838.  *
  2839.  * DIRECTDRAW DRIVER CAPABILITY FLAGS
  2840.  *
  2841.  ****************************************************************************/
  2842.  
  2843. /*
  2844.  * Display hardware has 3D acceleration.
  2845.  */
  2846. #define DDCAPS_3D                       0x00000001l
  2847.  
  2848. /*
  2849.  * Indicates that DirectDraw will support only dest rectangles that are aligned
  2850.  * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
  2851.  * READ ONLY.
  2852.  */
  2853. #define DDCAPS_ALIGNBOUNDARYDEST        0x00000002l
  2854.  
  2855. /*
  2856.  * Indicates that DirectDraw will support only source rectangles  whose sizes in
  2857.  * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively.  READ ONLY.
  2858.  */
  2859. #define DDCAPS_ALIGNSIZEDEST            0x00000004l
  2860. /*
  2861.  * Indicates that DirectDraw will support only source rectangles that are aligned
  2862.  * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
  2863.  * READ ONLY.
  2864.  */
  2865. #define DDCAPS_ALIGNBOUNDARYSRC         0x00000008l
  2866.  
  2867. /*
  2868.  * Indicates that DirectDraw will support only source rectangles  whose sizes in
  2869.  * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively.  READ ONLY.
  2870.  */
  2871. #define DDCAPS_ALIGNSIZESRC             0x00000010l
  2872.  
  2873. /*
  2874.  * Indicates that DirectDraw will create video memory surfaces that have a stride
  2875.  * alignment equal to DIRECTDRAWCAPS.dwAlignStride.  READ ONLY.
  2876.  */
  2877. #define DDCAPS_ALIGNSTRIDE              0x00000020l
  2878.  
  2879. /*
  2880.  * Display hardware is capable of blt operations.
  2881.  */
  2882. #define DDCAPS_BLT                      0x00000040l
  2883.  
  2884. /*
  2885.  * Display hardware is capable of asynchronous blt operations.
  2886.  */
  2887. #define DDCAPS_BLTQUEUE                 0x00000080l
  2888.  
  2889. /*
  2890.  * Display hardware is capable of color space conversions during the blt operation.
  2891.  */
  2892. #define DDCAPS_BLTFOURCC                0x00000100l
  2893.  
  2894. /*
  2895.  * Display hardware is capable of stretching during blt operations.
  2896.  */
  2897. #define DDCAPS_BLTSTRETCH               0x00000200l
  2898.  
  2899. /*
  2900.  * Display hardware is shared with GDI.
  2901.  */
  2902. #define DDCAPS_GDI                      0x00000400l
  2903.  
  2904. /*
  2905.  * Display hardware can overlay.
  2906.  */
  2907. #define DDCAPS_OVERLAY                  0x00000800l
  2908.  
  2909. /*
  2910.  * Set if display hardware supports overlays but can not clip them.
  2911.  */
  2912. #define DDCAPS_OVERLAYCANTCLIP          0x00001000l
  2913.  
  2914. /*
  2915.  * Indicates that overlay hardware is capable of color space conversions during
  2916.  * the overlay operation.
  2917.  */
  2918. #define DDCAPS_OVERLAYFOURCC            0x00002000l
  2919.  
  2920. /*
  2921.  * Indicates that stretching can be done by the overlay hardware.
  2922.  */
  2923. #define DDCAPS_OVERLAYSTRETCH           0x00004000l
  2924.  
  2925. /*
  2926.  * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
  2927.  * other than the primary surface.
  2928.  */
  2929. #define DDCAPS_PALETTE                  0x00008000l
  2930.  
  2931. /*
  2932.  * Indicates that palette changes can be syncd with the veritcal refresh.
  2933.  */
  2934. #define DDCAPS_PALETTEVSYNC             0x00010000l
  2935.  
  2936. /*
  2937.  * Display hardware can return the current scan line.
  2938.  */
  2939. #define DDCAPS_READSCANLINE             0x00020000l
  2940.  
  2941.  
  2942. /*
  2943.  * This flag used to bo DDCAPS_STEREOVIEW, which is now obsolete
  2944.  */
  2945. #define DDCAPS_RESERVED1                0x00040000l
  2946.  
  2947. /*
  2948.  * Display hardware is capable of generating a vertical blank interrupt.
  2949.  */
  2950. #define DDCAPS_VBI                      0x00080000l
  2951.  
  2952. /*
  2953.  * Supports the use of z buffers with blt operations.
  2954.  */
  2955. #define DDCAPS_ZBLTS                    0x00100000l
  2956.  
  2957. /*
  2958.  * Supports Z Ordering of overlays.
  2959.  */
  2960. #define DDCAPS_ZOVERLAYS                0x00200000l
  2961.  
  2962. /*
  2963.  * Supports color key
  2964.  */
  2965. #define DDCAPS_COLORKEY                 0x00400000l
  2966.  
  2967. /*
  2968.  * Supports alpha surfaces
  2969.  */
  2970. #define DDCAPS_ALPHA                    0x00800000l
  2971.  
  2972. /*
  2973.  * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
  2974.  */
  2975. #define DDCAPS_COLORKEYHWASSIST         0x01000000l
  2976.  
  2977. /*
  2978.  * no hardware support at all
  2979.  */
  2980. #define DDCAPS_NOHARDWARE               0x02000000l
  2981.  
  2982. /*
  2983.  * Display hardware is capable of color fill with bltter
  2984.  */
  2985. #define DDCAPS_BLTCOLORFILL             0x04000000l
  2986.  
  2987. /*
  2988.  * Display hardware is bank switched, and potentially very slow at
  2989.  * random access to VRAM.
  2990.  */
  2991. #define DDCAPS_BANKSWITCHED             0x08000000l
  2992.  
  2993. /*
  2994.  * Display hardware is capable of depth filling Z-buffers with bltter
  2995.  */
  2996. #define DDCAPS_BLTDEPTHFILL             0x10000000l
  2997.  
  2998. /*
  2999.  * Display hardware is capable of clipping while bltting.
  3000.  */
  3001. #define DDCAPS_CANCLIP                  0x20000000l
  3002.  
  3003. /*
  3004.  * Display hardware is capable of clipping while stretch bltting.
  3005.  */
  3006. #define DDCAPS_CANCLIPSTRETCHED         0x40000000l
  3007.  
  3008. /*
  3009.  * Display hardware is capable of bltting to or from system memory
  3010.  */
  3011. #define DDCAPS_CANBLTSYSMEM             0x80000000l
  3012.  
  3013.  
  3014.  /****************************************************************************
  3015.  *
  3016.  * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  3017.  *
  3018.  ****************************************************************************/
  3019.  
  3020. /*
  3021.  * Display hardware is certified
  3022.  */
  3023. #define DDCAPS2_CERTIFIED              0x00000001l
  3024.  
  3025. /*
  3026.  * Driver cannot interleave 2D operations (lock and blt) to surfaces with
  3027.  * Direct3D rendering operations between calls to BeginScene() and EndScene()
  3028.  */
  3029. #define DDCAPS2_NO2DDURING3DSCENE       0x00000002l
  3030.  
  3031. /*
  3032.  * Display hardware contains a video port
  3033.  */
  3034. #define DDCAPS2_VIDEOPORT               0x00000004l
  3035.  
  3036. /*
  3037.  * The overlay can be automatically flipped according to the video port
  3038.  * VSYNCs, providing automatic doubled buffered display of video port
  3039.  * data using an overlay
  3040.  */
  3041. #define DDCAPS2_AUTOFLIPOVERLAY         0x00000008l
  3042.  
  3043. /*
  3044.  * Overlay can display each field of interlaced data individually while
  3045.  * it is interleaved in memory without causing jittery artifacts.
  3046.  */
  3047. #define DDCAPS2_CANBOBINTERLEAVED       0x00000010l
  3048.  
  3049. /*
  3050.  * Overlay can display each field of interlaced data individually while
  3051.  * it is not interleaved in memory without causing jittery artifacts.
  3052.  */
  3053. #define DDCAPS2_CANBOBNONINTERLEAVED    0x00000020l
  3054.  
  3055. /*
  3056.  * The overlay surface contains color controls (brightness, sharpness, etc.)
  3057.  */
  3058. #define DDCAPS2_COLORCONTROLOVERLAY     0x00000040l
  3059.  
  3060. /*
  3061.  * The primary surface contains color controls (gamma, etc.)
  3062.  */
  3063. #define DDCAPS2_COLORCONTROLPRIMARY     0x00000080l
  3064.  
  3065. /*
  3066.  * RGBZ -> RGB supported for 16:16 RGB:Z
  3067.  */
  3068. #define DDCAPS2_CANDROPZ16BIT           0x00000100l
  3069.  
  3070. /*
  3071.  * Driver supports non-local video memory.
  3072.  */
  3073. #define DDCAPS2_NONLOCALVIDMEM          0x00000200l
  3074.  
  3075. /*
  3076.  * Dirver supports non-local video memory but has different capabilities for
  3077.  * non-local video memory surfaces. If this bit is set then so must
  3078.  * DDCAPS2_NONLOCALVIDMEM.
  3079.  */
  3080. #define DDCAPS2_NONLOCALVIDMEMCAPS      0x00000400l
  3081.  
  3082. /*
  3083.  * Driver neither requires nor prefers surfaces to be pagelocked when performing
  3084.  * blts involving system memory surfaces
  3085.  */
  3086. #define DDCAPS2_NOPAGELOCKREQUIRED      0x00000800l
  3087.  
  3088. /*
  3089.  * Driver can create surfaces which are wider than the primary surface
  3090.  */
  3091. #define DDCAPS2_WIDESURFACES            0x00001000l
  3092.  
  3093. /*
  3094.  * Driver supports bob without using a video port by handling the
  3095.  * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip.
  3096.  */
  3097. #define DDCAPS2_CANFLIPODDEVEN          0x00002000l
  3098.  
  3099. /*
  3100.  * Driver supports bob using hardware
  3101.  */
  3102. #define DDCAPS2_CANBOBHARDWARE          0x00004000l
  3103.  
  3104. /*
  3105.  * Driver supports bltting any FOURCC surface to another surface of the same FOURCC
  3106.  */
  3107. #define DDCAPS2_COPYFOURCC              0x00008000l
  3108.  
  3109.  
  3110. /*
  3111.  * Driver supports loadable gamma ramps for the primary surface
  3112.  */
  3113. #define DDCAPS2_PRIMARYGAMMA            0x00020000l
  3114.  
  3115. /*
  3116.  * Driver can render in windowed mode.
  3117.  */
  3118. #define DDCAPS2_CANRENDERWINDOWED       0x00080000l
  3119.  
  3120. /*
  3121.  * A calibrator is available to adjust the gamma ramp according to the
  3122.  * physical display properties so that the result will be identical on
  3123.  * all calibrated systems.
  3124.  */
  3125. #define DDCAPS2_CANCALIBRATEGAMMA       0x00100000l
  3126.  
  3127. /*
  3128.  * Indicates that the driver will respond to DDFLIP_INTERVALn flags
  3129.  */
  3130. #define DDCAPS2_FLIPINTERVAL            0x00200000l
  3131.  
  3132. /*
  3133.  * Indicates that the driver will respond to DDFLIP_NOVSYNC
  3134.  */
  3135. #define DDCAPS2_FLIPNOVSYNC             0x00400000l
  3136.  
  3137. /*
  3138.  * Driver supports management of video memory, if this flag is ON,
  3139.  * driver manages the texture if requested with DDSCAPS2_TEXTUREMANAGE on
  3140.  * DirectX manages the texture if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
  3141.  */
  3142. #define DDCAPS2_CANMANAGETEXTURE        0x00800000l
  3143.  
  3144. /*
  3145.  * The Direct3D texture manager uses this cap to decide whether to put managed
  3146.  * surfaces in non-local video memory. If the cap is set, the texture manager will
  3147.  * put managed surfaces in non-local vidmem. Drivers that cannot texture from
  3148.  * local vidmem SHOULD NOT set this cap.
  3149.  */
  3150. #define DDCAPS2_TEXMANINNONLOCALVIDMEM  0x01000000l
  3151.  
  3152. /*
  3153.  * Indicates that the driver supports DX7 type of stereo in at least one mode (which may
  3154.  * not necessarily be the current mode). Applications should use IDirectDraw7 (or higher)
  3155.  * ::EnumDisplayModes and check the DDSURFACEDESC.ddsCaps.dwCaps2 field for the presence of
  3156.  * DDSCAPS2_STEREOSURFACELEFT to check if a particular mode supports stereo. The application
  3157.  * can also use IDirectDraw7(or higher)::GetDisplayMode to check the current mode.
  3158.  */
  3159. #define DDCAPS2_STEREO                  0x02000000L
  3160.  
  3161. /*
  3162.  * This caps bit is intended for internal DirectDraw use. 
  3163.  * -It is only valid if DDCAPS2_NONLOCALVIDMEMCAPS is set.
  3164.  * -If this bit is set, then DDCAPS_CANBLTSYSMEM MUST be set by the driver (and
  3165.  *  all the assoicated system memory blt caps must be correct).
  3166.  * -It implies that the system->video blt caps in DDCAPS also apply to system to 
  3167.  *  nonlocal blts. I.e. the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCaps and dwSVBRops
  3168.  *  members of DDCAPS (DDCORECAPS) are filled in correctly.
  3169.  * -Any blt from system to nonlocal memory that matches these caps bits will
  3170.  *  be passed to the driver.
  3171.  *
  3172.  * NOTE: This is intended to enable the driver itself to do efficient reordering
  3173.  * of textures. This is NOT meant to imply that hardware can write into AGP memory.
  3174.  * This operation is not currently supported.
  3175.  */
  3176. #define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL   0x04000000L
  3177.  
  3178.  
  3179.  
  3180. /****************************************************************************
  3181.  *
  3182.  * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  3183.  *
  3184.  ****************************************************************************/
  3185.  
  3186. /*
  3187.  * Supports alpha blending around the edge of a source color keyed surface.
  3188.  * For Blt.
  3189.  */
  3190. #define DDFXALPHACAPS_BLTALPHAEDGEBLEND         0x00000001l
  3191.  
  3192. /*
  3193.  * Supports alpha information in the pixel format.  The bit depth of alpha
  3194.  * information in the pixel format can be 1,2,4, or 8.  The alpha value becomes
  3195.  * more opaque as the alpha value increases.  (0 is transparent.)
  3196.  * For Blt.
  3197.  */
  3198. #define DDFXALPHACAPS_BLTALPHAPIXELS            0x00000002l
  3199.  
  3200. /*
  3201.  * Supports alpha information in the pixel format.  The bit depth of alpha
  3202.  * information in the pixel format can be 1,2,4, or 8.  The alpha value
  3203.  * becomes more transparent as the alpha value increases.  (0 is opaque.)
  3204.  * This flag can only be set if DDCAPS_ALPHA is set.
  3205.  * For Blt.
  3206.  */
  3207. #define DDFXALPHACAPS_BLTALPHAPIXELSNEG         0x00000004l
  3208.  
  3209. /*
  3210.  * Supports alpha only surfaces.  The bit depth of an alpha only surface can be
  3211.  * 1,2,4, or 8.  The alpha value becomes more opaque as the alpha value increases.
  3212.  * (0 is transparent.)
  3213.  * For Blt.
  3214.  */
  3215. #define DDFXALPHACAPS_BLTALPHASURFACES          0x00000008l
  3216.  
  3217. /*
  3218.  * The depth of the alpha channel data can range can be 1,2,4, or 8.
  3219.  * The NEG suffix indicates that this alpha channel becomes more transparent
  3220.  * as the alpha value increases. (0 is opaque.)  This flag can only be set if
  3221.  * DDCAPS_ALPHA is set.
  3222.  * For Blt.
  3223.  */
  3224. #define DDFXALPHACAPS_BLTALPHASURFACESNEG       0x00000010l
  3225.  
  3226. /*
  3227.  * Supports alpha blending around the edge of a source color keyed surface.
  3228.  * For Overlays.
  3229.  */
  3230. #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND     0x00000020l
  3231.  
  3232. /*
  3233.  * Supports alpha information in the pixel format.  The bit depth of alpha
  3234.  * information in the pixel format can be 1,2,4, or 8.  The alpha value becomes
  3235.  * more opaque as the alpha value increases.  (0 is transparent.)
  3236.  * For Overlays.
  3237.  */
  3238. #define DDFXALPHACAPS_OVERLAYALPHAPIXELS        0x00000040l
  3239.  
  3240. /*
  3241.  * Supports alpha information in the pixel format.  The bit depth of alpha
  3242.  * information in the pixel format can be 1,2,4, or 8.  The alpha value
  3243.  * becomes more transparent as the alpha value increases.  (0 is opaque.)
  3244.  * This flag can only be set if DDCAPS_ALPHA is set.
  3245.  * For Overlays.
  3246.  */
  3247. #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG     0x00000080l
  3248.  
  3249. /*
  3250.  * Supports alpha only surfaces.  The bit depth of an alpha only surface can be
  3251.  * 1,2,4, or 8.  The alpha value becomes more opaque as the alpha value increases.
  3252.  * (0 is transparent.)
  3253.  * For Overlays.
  3254.  */
  3255. #define DDFXALPHACAPS_OVERLAYALPHASURFACES      0x00000100l
  3256.  
  3257. /*
  3258.  * The depth of the alpha channel data can range can be 1,2,4, or 8.
  3259.  * The NEG suffix indicates that this alpha channel becomes more transparent
  3260.  * as the alpha value increases. (0 is opaque.)  This flag can only be set if
  3261.  * DDCAPS_ALPHA is set.
  3262.  * For Overlays.
  3263.  */
  3264. #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG   0x00000200l
  3265.  
  3266. #if DIRECTDRAW_VERSION < 0x0600
  3267. #endif  //DIRECTDRAW_VERSION
  3268.  
  3269.  
  3270.  
  3271. /****************************************************************************
  3272.  *
  3273.  * DIRECTDRAW FX CAPABILITY FLAGS
  3274.  *
  3275.  ****************************************************************************/
  3276.  
  3277. /*
  3278.  * Uses arithmetic operations to stretch and shrink surfaces during blt
  3279.  * rather than pixel doubling techniques.  Along the Y axis.
  3280.  */
  3281. #define DDFXCAPS_BLTARITHSTRETCHY       0x00000020l
  3282.  
  3283. /*
  3284.  * Uses arithmetic operations to stretch during blt
  3285.  * rather than pixel doubling techniques.  Along the Y axis. Only
  3286.  * works for x1, x2, etc.
  3287.  */
  3288. #define DDFXCAPS_BLTARITHSTRETCHYN      0x00000010l
  3289.  
  3290. /*
  3291.  * Supports mirroring left to right in blt.
  3292.  */
  3293. #define DDFXCAPS_BLTMIRRORLEFTRIGHT     0x00000040l
  3294.  
  3295. /*
  3296.  * Supports mirroring top to bottom in blt.
  3297.  */
  3298. #define DDFXCAPS_BLTMIRRORUPDOWN        0x00000080l
  3299.  
  3300. /*
  3301.  * Supports arbitrary rotation for blts.
  3302.  */
  3303. #define DDFXCAPS_BLTROTATION            0x00000100l
  3304.  
  3305. /*
  3306.  * Supports 90 degree rotations for blts.
  3307.  */
  3308. #define DDFXCAPS_BLTROTATION90          0x00000200l
  3309.  
  3310. /*
  3311.  * DirectDraw supports arbitrary shrinking of a surface along the
  3312.  * x axis (horizontal direction) for blts.
  3313.  */
  3314. #define DDFXCAPS_BLTSHRINKX             0x00000400l
  3315.  
  3316. /*
  3317.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3318.  * along the x axis (horizontal direction) for blts.
  3319.  */
  3320. #define DDFXCAPS_BLTSHRINKXN            0x00000800l
  3321.  
  3322. /*
  3323.  * DirectDraw supports arbitrary shrinking of a surface along the
  3324.  * y axis (horizontal direction) for blts.
  3325.  */
  3326. #define DDFXCAPS_BLTSHRINKY             0x00001000l
  3327.  
  3328. /*
  3329.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3330.  * along the y axis (vertical direction) for blts.
  3331.  */
  3332. #define DDFXCAPS_BLTSHRINKYN            0x00002000l
  3333.  
  3334. /*
  3335.  * DirectDraw supports arbitrary stretching of a surface along the
  3336.  * x axis (horizontal direction) for blts.
  3337.  */
  3338. #define DDFXCAPS_BLTSTRETCHX            0x00004000l
  3339.  
  3340. /*
  3341.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  3342.  * along the x axis (horizontal direction) for blts.
  3343.  */
  3344. #define DDFXCAPS_BLTSTRETCHXN           0x00008000l
  3345.  
  3346. /*
  3347.  * DirectDraw supports arbitrary stretching of a surface along the
  3348.  * y axis (horizontal direction) for blts.
  3349.  */
  3350. #define DDFXCAPS_BLTSTRETCHY            0x00010000l
  3351.  
  3352. /*
  3353.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  3354.  * along the y axis (vertical direction) for blts.
  3355.  */
  3356. #define DDFXCAPS_BLTSTRETCHYN           0x00020000l
  3357.  
  3358. /*
  3359.  * Uses arithmetic operations to stretch and shrink surfaces during
  3360.  * overlay rather than pixel doubling techniques.  Along the Y axis
  3361.  * for overlays.
  3362.  */
  3363. #define DDFXCAPS_OVERLAYARITHSTRETCHY   0x00040000l
  3364.  
  3365. /*
  3366.  * Uses arithmetic operations to stretch surfaces during
  3367.  * overlay rather than pixel doubling techniques.  Along the Y axis
  3368.  * for overlays. Only works for x1, x2, etc.
  3369.  */
  3370. #define DDFXCAPS_OVERLAYARITHSTRETCHYN  0x00000008l
  3371.  
  3372. /*
  3373.  * DirectDraw supports arbitrary shrinking of a surface along the
  3374.  * x axis (horizontal direction) for overlays.
  3375.  */
  3376. #define DDFXCAPS_OVERLAYSHRINKX         0x00080000l
  3377.  
  3378. /*
  3379.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3380.  * along the x axis (horizontal direction) for overlays.
  3381.  */
  3382. #define DDFXCAPS_OVERLAYSHRINKXN        0x00100000l
  3383.  
  3384. /*
  3385.  * DirectDraw supports arbitrary shrinking of a surface along the
  3386.  * y axis (horizontal direction) for overlays.
  3387.  */
  3388. #define DDFXCAPS_OVERLAYSHRINKY         0x00200000l
  3389.  
  3390. /*
  3391.  * DirectDraw supports integer shrinking (1x,2x,) of a surface
  3392.  * along the y axis (vertical direction) for overlays.
  3393.  */
  3394. #define DDFXCAPS_OVERLAYSHRINKYN        0x00400000l
  3395.  
  3396. /*
  3397.  * DirectDraw supports arbitrary stretching of a surface along the
  3398.  * x axis (horizontal direction) for overlays.
  3399.  */
  3400. #define DDFXCAPS_OVERLAYSTRETCHX        0x00800000l
  3401.  
  3402. /*
  3403.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  3404.  * along the x axis (horizontal direction) for overlays.
  3405.  */
  3406. #define DDFXCAPS_OVERLAYSTRETCHXN       0x01000000l
  3407.  
  3408. /*
  3409.  * DirectDraw supports arbitrary stretching of a surface along the
  3410.  * y axis (horizontal direction) for overlays.
  3411.  */
  3412. #define DDFXCAPS_OVERLAYSTRETCHY        0x02000000l
  3413.  
  3414. /*
  3415.  * DirectDraw supports integer stretching (1x,2x,) of a surface
  3416.  * along the y axis (vertical direction) for overlays.
  3417.  */
  3418. #define DDFXCAPS_OVERLAYSTRETCHYN       0x04000000l
  3419.  
  3420. /*
  3421.  * DirectDraw supports mirroring of overlays across the vertical axis
  3422.  */
  3423. #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l
  3424.  
  3425. /*
  3426.  * DirectDraw supports mirroring of overlays across the horizontal axis
  3427.  */
  3428. #define DDFXCAPS_OVERLAYMIRRORUPDOWN    0x10000000l
  3429.  
  3430. /*
  3431.  * Driver can do alpha blending for blits.
  3432.  */
  3433. #define DDFXCAPS_BLTALPHA               0x00000001l
  3434.  
  3435.  
  3436. /*
  3437.  * Driver can do surface-reconstruction filtering for warped blits.
  3438.  */
  3439. #define DDFXCAPS_BLTFILTER              DDFXCAPS_BLTARITHSTRETCHY
  3440.  
  3441. /*
  3442.  * Driver can do alpha blending for overlays.
  3443.  */
  3444. #define DDFXCAPS_OVERLAYALPHA           0x00000004l
  3445.  
  3446.  
  3447. /*
  3448.  * Driver can do surface-reconstruction filtering for warped overlays.
  3449.  */
  3450. #define DDFXCAPS_OVERLAYFILTER          DDFXCAPS_OVERLAYARITHSTRETCHY
  3451.  
  3452.  
  3453. /****************************************************************************
  3454.  *
  3455.  * DIRECTDRAW STEREO VIEW CAPABILITIES
  3456.  *
  3457.  ****************************************************************************/
  3458.  
  3459. /*
  3460.  * This flag used to be DDSVCAPS_ENIGMA, which is now obsolete
  3461.  */
  3462.  
  3463. #define DDSVCAPS_RESERVED1              0x00000001l
  3464.  
  3465. /*
  3466.  * This flag used to be DDSVCAPS_FLICKER, which is now obsolete
  3467.  */
  3468. #define DDSVCAPS_RESERVED2              0x00000002l
  3469.  
  3470. /*
  3471.  * This flag used to be DDSVCAPS_REDBLUE, which is now obsolete
  3472.  */
  3473. #define DDSVCAPS_RESERVED3              0x00000004l
  3474.  
  3475. /*
  3476.  * This flag used to be DDSVCAPS_SPLIT, which is now obsolete
  3477.  */
  3478. #define DDSVCAPS_RESERVED4              0x00000008l
  3479.  
  3480. /*
  3481.  * The stereo view is accomplished with switching technology
  3482.  */
  3483.  
  3484. #define DDSVCAPS_STEREOSEQUENTIAL       0x00000010L
  3485.  
  3486.  
  3487.  
  3488.  
  3489. /****************************************************************************
  3490.  *
  3491.  * DIRECTDRAWPALETTE CAPABILITIES
  3492.  *
  3493.  ****************************************************************************/
  3494.  
  3495. /*
  3496.  * Index is 4 bits.  There are sixteen color entries in the palette table.
  3497.  */
  3498. #define DDPCAPS_4BIT                    0x00000001l
  3499.  
  3500. /*
  3501.  * Index is onto a 8 bit color index.  This field is only valid with the
  3502.  * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
  3503.  * surface is in 8bpp. Each color entry is one byte long and is an index
  3504.  * into destination surface's 8bpp palette.
  3505.  */
  3506. #define DDPCAPS_8BITENTRIES             0x00000002l
  3507.  
  3508. /*
  3509.  * Index is 8 bits.  There are 256 color entries in the palette table.
  3510.  */
  3511. #define DDPCAPS_8BIT                    0x00000004l
  3512.  
  3513. /*
  3514.  * Indicates that this DIRECTDRAWPALETTE should use the palette color array
  3515.  * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
  3516.  * object.
  3517.  * This flag is obsolete. DirectDraw always initializes the color array from
  3518.  * the lpDDColorArray parameter. The definition remains for source-level
  3519.  * compatibility.
  3520.  */
  3521. #define DDPCAPS_INITIALIZE              0x00000000l
  3522.  
  3523. /*
  3524.  * This palette is the one attached to the primary surface.  Changing this
  3525.  * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
  3526.  * and supported.
  3527.  */
  3528. #define DDPCAPS_PRIMARYSURFACE          0x00000010l
  3529.  
  3530. /*
  3531.  * This palette is the one attached to the primary surface left.  Changing
  3532.  * this table has immediate effect on the display for the left eye unless
  3533.  * DDPSETPAL_VSYNC is specified and supported.
  3534.  */
  3535. #define DDPCAPS_PRIMARYSURFACELEFT      0x00000020l
  3536.  
  3537. /*
  3538.  * This palette can have all 256 entries defined
  3539.  */
  3540. #define DDPCAPS_ALLOW256                0x00000040l
  3541.  
  3542. /*
  3543.  * This palette can have modifications to it synced with the monitors
  3544.  * refresh rate.
  3545.  */
  3546. #define DDPCAPS_VSYNC                   0x00000080l
  3547.  
  3548. /*
  3549.  * Index is 1 bit.  There are two color entries in the palette table.
  3550.  */
  3551. #define DDPCAPS_1BIT                    0x00000100l
  3552.  
  3553. /*
  3554.  * Index is 2 bit.  There are four color entries in the palette table.
  3555.  */
  3556. #define DDPCAPS_2BIT                    0x00000200l
  3557.  
  3558. /*
  3559.  * The peFlags member of PALETTEENTRY denotes an 8 bit alpha value
  3560.  */
  3561. #define DDPCAPS_ALPHA                   0x00000400l
  3562.  
  3563.  
  3564. /****************************************************************************
  3565.  *
  3566.  * DIRECTDRAWPALETTE SETENTRY CONSTANTS
  3567.  *
  3568.  ****************************************************************************/
  3569.  
  3570.  
  3571. /****************************************************************************
  3572.  *
  3573.  * DIRECTDRAWPALETTE GETENTRY CONSTANTS
  3574.  *
  3575.  ****************************************************************************/
  3576.  
  3577. /* 0 is the only legal value */
  3578.  
  3579. /****************************************************************************
  3580.  *
  3581.  * DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS
  3582.  *
  3583.  ****************************************************************************/
  3584.  
  3585. /*
  3586.  * The passed pointer is an IUnknown ptr. The cbData argument to SetPrivateData
  3587.  * must be set to sizeof(IUnknown*). DirectDraw will call AddRef through this
  3588.  * pointer and Release when the private data is destroyed. This includes when
  3589.  * the surface or palette is destroyed before such priovate data is destroyed.
  3590.  */
  3591. #define DDSPD_IUNKNOWNPOINTER           0x00000001L
  3592.  
  3593. /*
  3594.  * Private data is only valid for the current state of the object,
  3595.  * as determined by the uniqueness value.
  3596.  */
  3597. #define DDSPD_VOLATILE                  0x00000002L
  3598.  
  3599.  
  3600. /****************************************************************************
  3601.  *
  3602.  * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
  3603.  *
  3604.  ****************************************************************************/
  3605.  
  3606.  
  3607. /****************************************************************************
  3608.  *
  3609.  * DIRECTDRAW BITDEPTH CONSTANTS
  3610.  *
  3611.  * NOTE:  These are only used to indicate supported bit depths.   These
  3612.  * are flags only, they are not to be used as an actual bit depth.   The
  3613.  * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  3614.  * bit depths in a surface or for changing the display mode.
  3615.  *
  3616.  ****************************************************************************/
  3617.  
  3618. /*
  3619.  * 1 bit per pixel.
  3620.  */
  3621. #define DDBD_1                  0x00004000l
  3622.  
  3623. /*
  3624.  * 2 bits per pixel.
  3625.  */
  3626. #define DDBD_2                  0x00002000l
  3627.  
  3628. /*
  3629.  * 4 bits per pixel.
  3630.  */
  3631. #define DDBD_4                  0x00001000l
  3632.  
  3633. /*
  3634.  * 8 bits per pixel.
  3635.  */
  3636. #define DDBD_8                  0x00000800l
  3637.  
  3638. /*
  3639.  * 16 bits per pixel.
  3640.  */
  3641. #define DDBD_16                 0x00000400l
  3642.  
  3643. /*
  3644.  * 24 bits per pixel.
  3645.  */
  3646. #define DDBD_24                 0X00000200l
  3647.  
  3648. /*
  3649.  * 32 bits per pixel.
  3650.  */
  3651. #define DDBD_32                 0x00000100l
  3652.  
  3653. /****************************************************************************
  3654.  *
  3655.  * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  3656.  *
  3657.  ****************************************************************************/
  3658.  
  3659. /*
  3660.  * Set if the structure contains a color space.  Not set if the structure
  3661.  * contains a single color key.
  3662.  */
  3663. #define DDCKEY_COLORSPACE       0x00000001l
  3664.  
  3665. /*
  3666.  * Set if the structure specifies a color key or color space which is to be
  3667.  * used as a destination color key for blt operations.
  3668.  */
  3669. #define DDCKEY_DESTBLT          0x00000002l
  3670.  
  3671. /*
  3672.  * Set if the structure specifies a color key or color space which is to be
  3673.  * used as a destination color key for overlay operations.
  3674.  */
  3675. #define DDCKEY_DESTOVERLAY      0x00000004l
  3676.  
  3677. /*
  3678.  * Set if the structure specifies a color key or color space which is to be
  3679.  * used as a source color key for blt operations.
  3680.  */
  3681. #define DDCKEY_SRCBLT           0x00000008l
  3682.  
  3683. /*
  3684.  * Set if the structure specifies a color key or color space which is to be
  3685.  * used as a source color key for overlay operations.
  3686.  */
  3687. #define DDCKEY_SRCOVERLAY       0x00000010l
  3688.  
  3689.  
  3690. /****************************************************************************
  3691.  *
  3692.  * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  3693.  *
  3694.  ****************************************************************************/
  3695.  
  3696. /*
  3697.  * Supports transparent blting using a color key to identify the replaceable
  3698.  * bits of the destination surface for RGB colors.
  3699.  */
  3700. #define DDCKEYCAPS_DESTBLT                      0x00000001l
  3701.  
  3702. /*
  3703.  * Supports transparent blting using a color space to identify the replaceable
  3704.  * bits of the destination surface for RGB colors.
  3705.  */
  3706. #define DDCKEYCAPS_DESTBLTCLRSPACE              0x00000002l
  3707.  
  3708. /*
  3709.  * Supports transparent blting using a color space to identify the replaceable
  3710.  * bits of the destination surface for YUV colors.
  3711.  */
  3712. #define DDCKEYCAPS_DESTBLTCLRSPACEYUV           0x00000004l
  3713.  
  3714. /*
  3715.  * Supports transparent blting using a color key to identify the replaceable
  3716.  * bits of the destination surface for YUV colors.
  3717.  */
  3718. #define DDCKEYCAPS_DESTBLTYUV                   0x00000008l
  3719.  
  3720. /*
  3721.  * Supports overlaying using colorkeying of the replaceable bits of the surface
  3722.  * being overlayed for RGB colors.
  3723.  */
  3724. #define DDCKEYCAPS_DESTOVERLAY                  0x00000010l
  3725.  
  3726. /*
  3727.  * Supports a color space as the color key for the destination for RGB colors.
  3728.  */
  3729. #define DDCKEYCAPS_DESTOVERLAYCLRSPACE          0x00000020l
  3730.  
  3731. /*
  3732.  * Supports a color space as the color key for the destination for YUV colors.
  3733.  */
  3734. #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV       0x00000040l
  3735.  
  3736. /*
  3737.  * Supports only one active destination color key value for visible overlay
  3738.  * surfaces.
  3739.  */
  3740. #define DDCKEYCAPS_DESTOVERLAYONEACTIVE         0x00000080l
  3741.  
  3742. /*
  3743.  * Supports overlaying using colorkeying of the replaceable bits of the
  3744.  * surface being overlayed for YUV colors.
  3745.  */
  3746. #define DDCKEYCAPS_DESTOVERLAYYUV               0x00000100l
  3747.  
  3748. /*
  3749.  * Supports transparent blting using the color key for the source with
  3750.  * this surface for RGB colors.
  3751.  */
  3752. #define DDCKEYCAPS_SRCBLT                       0x00000200l
  3753.  
  3754. /*
  3755.  * Supports transparent blting using a color space for the source with
  3756.  * this surface for RGB colors.
  3757.  */
  3758. #define DDCKEYCAPS_SRCBLTCLRSPACE               0x00000400l
  3759.  
  3760. /*
  3761.  * Supports transparent blting using a color space for the source with
  3762.  * this surface for YUV colors.
  3763.  */
  3764. #define DDCKEYCAPS_SRCBLTCLRSPACEYUV            0x00000800l
  3765.  
  3766. /*
  3767.  * Supports transparent blting using the color key for the source with
  3768.  * this surface for YUV colors.
  3769.  */
  3770. #define DDCKEYCAPS_SRCBLTYUV                    0x00001000l
  3771.  
  3772. /*
  3773.  * Supports overlays using the color key for the source with this
  3774.  * overlay surface for RGB colors.
  3775.  */
  3776. #define DDCKEYCAPS_SRCOVERLAY                   0x00002000l
  3777.  
  3778. /*
  3779.  * Supports overlays using a color space as the source color key for
  3780.  * the overlay surface for RGB colors.
  3781.  */
  3782. #define DDCKEYCAPS_SRCOVERLAYCLRSPACE           0x00004000l
  3783.  
  3784. /*
  3785.  * Supports overlays using a color space as the source color key for
  3786.  * the overlay surface for YUV colors.
  3787.  */
  3788. #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV        0x00008000l
  3789.  
  3790. /*
  3791.  * Supports only one active source color key value for visible
  3792.  * overlay surfaces.
  3793.  */
  3794. #define DDCKEYCAPS_SRCOVERLAYONEACTIVE          0x00010000l
  3795.  
  3796. /*
  3797.  * Supports overlays using the color key for the source with this
  3798.  * overlay surface for YUV colors.
  3799.  */
  3800. #define DDCKEYCAPS_SRCOVERLAYYUV                0x00020000l
  3801.  
  3802. /*
  3803.  * there are no bandwidth trade-offs for using colorkey with an overlay
  3804.  */
  3805. #define DDCKEYCAPS_NOCOSTOVERLAY                0x00040000l
  3806.  
  3807.  
  3808. /****************************************************************************
  3809.  *
  3810.  * DIRECTDRAW PIXELFORMAT FLAGS
  3811.  *
  3812.  ****************************************************************************/
  3813.  
  3814. /*
  3815.  * The surface has alpha channel information in the pixel format.
  3816.  */
  3817. #define DDPF_ALPHAPIXELS                        0x00000001l
  3818.  
  3819. /*
  3820.  * The pixel format contains alpha only information
  3821.  */
  3822. #define DDPF_ALPHA                              0x00000002l
  3823.  
  3824. /*
  3825.  * The FourCC code is valid.
  3826.  */
  3827. #define DDPF_FOURCC                             0x00000004l
  3828.  
  3829. /*
  3830.  * The surface is 4-bit color indexed.
  3831.  */
  3832. #define DDPF_PALETTEINDEXED4                    0x00000008l
  3833.  
  3834. /*
  3835.  * The surface is indexed into a palette which stores indices
  3836.  * into the destination surface's 8-bit palette.
  3837.  */
  3838. #define DDPF_PALETTEINDEXEDTO8                  0x00000010l
  3839.  
  3840. /*
  3841.  * The surface is 8-bit color indexed.
  3842.  */
  3843. #define DDPF_PALETTEINDEXED8                    0x00000020l
  3844.  
  3845. /*
  3846.  * The RGB data in the pixel format structure is valid.
  3847.  */
  3848. #define DDPF_RGB                                0x00000040l
  3849.  
  3850. /*
  3851.  * The surface will accept pixel data in the format specified
  3852.  * and compress it during the write.
  3853.  */
  3854. #define DDPF_COMPRESSED                         0x00000080l
  3855.  
  3856. /*
  3857.  * The surface will accept RGB data and translate it during
  3858.  * the write to YUV data.  The format of the data to be written
  3859.  * will be contained in the pixel format structure.  The DDPF_RGB
  3860.  * flag will be set.
  3861.  */
  3862. #define DDPF_RGBTOYUV                           0x00000100l
  3863.  
  3864. /*
  3865.  * pixel format is YUV - YUV data in pixel format struct is valid
  3866.  */
  3867. #define DDPF_YUV                                0x00000200l
  3868.  
  3869. /*
  3870.  * pixel format is a z buffer only surface
  3871.  */
  3872. #define DDPF_ZBUFFER                            0x00000400l
  3873.  
  3874. /*
  3875.  * The surface is 1-bit color indexed.
  3876.  */
  3877. #define DDPF_PALETTEINDEXED1                    0x00000800l
  3878.  
  3879. /*
  3880.  * The surface is 2-bit color indexed.
  3881.  */
  3882. #define DDPF_PALETTEINDEXED2                    0x00001000l
  3883.  
  3884. /*
  3885.  * The surface contains Z information in the pixels
  3886.  */
  3887. #define DDPF_ZPIXELS                            0x00002000l
  3888.  
  3889. /*
  3890.  * The surface contains stencil information along with Z
  3891.  */
  3892. #define DDPF_STENCILBUFFER                      0x00004000l
  3893.  
  3894. /*
  3895.  * Premultiplied alpha format -- the color components have been
  3896.  * premultiplied by the alpha component.
  3897.  */
  3898. #define DDPF_ALPHAPREMULT                       0x00008000l
  3899.  
  3900.  
  3901. /*
  3902.  * Luminance data in the pixel format is valid.
  3903.  * Use this flag for luminance-only or luminance+alpha surfaces,
  3904.  * the bit depth is then ddpf.dwLuminanceBitCount.
  3905.  */
  3906. #define DDPF_LUMINANCE                          0x00020000l
  3907.  
  3908. /*
  3909.  * Luminance data in the pixel format is valid.
  3910.  * Use this flag when hanging luminance off bumpmap surfaces,
  3911.  * the bit mask for the luminance portion of the pixel is then
  3912.  * ddpf.dwBumpLuminanceBitMask
  3913.  */
  3914. #define DDPF_BUMPLUMINANCE                      0x00040000l
  3915.  
  3916. /*
  3917.  * Bump map dUdV data in the pixel format is valid.
  3918.  */
  3919. #define DDPF_BUMPDUDV                           0x00080000l
  3920.  
  3921.  
  3922. /*===========================================================================
  3923.  *
  3924.  *
  3925.  * DIRECTDRAW CALLBACK FLAGS
  3926.  *
  3927.  *
  3928.  *==========================================================================*/
  3929.  
  3930. /****************************************************************************
  3931.  *
  3932.  * DIRECTDRAW ENUMSURFACES FLAGS
  3933.  *
  3934.  ****************************************************************************/
  3935.  
  3936. /*
  3937.  * Enumerate all of the surfaces that meet the search criterion.
  3938.  */
  3939. #define DDENUMSURFACES_ALL                      0x00000001l
  3940.  
  3941. /*
  3942.  * A search hit is a surface that matches the surface description.
  3943.  */
  3944. #define DDENUMSURFACES_MATCH                    0x00000002l
  3945.  
  3946. /*
  3947.  * A search hit is a surface that does not match the surface description.
  3948.  */
  3949. #define DDENUMSURFACES_NOMATCH                  0x00000004l
  3950.  
  3951. /*
  3952.  * Enumerate the first surface that can be created which meets the search criterion.
  3953.  */
  3954. #define DDENUMSURFACES_CANBECREATED             0x00000008l
  3955.  
  3956. /*
  3957.  * Enumerate the surfaces that already exist that meet the search criterion.
  3958.  */
  3959. #define DDENUMSURFACES_DOESEXIST                0x00000010l
  3960.  
  3961.  
  3962. /****************************************************************************
  3963.  *
  3964.  * DIRECTDRAW SETDISPLAYMODE FLAGS
  3965.  *
  3966.  ****************************************************************************/
  3967.  
  3968. /*
  3969.  * The desired mode is a standard VGA mode
  3970.  */
  3971. #define DDSDM_STANDARDVGAMODE                   0x00000001l
  3972.  
  3973.  
  3974.  
  3975. /****************************************************************************
  3976.  *
  3977.  * DIRECTDRAW ENUMDISPLAYMODES FLAGS
  3978.  *
  3979.  ****************************************************************************/
  3980.  
  3981. /*
  3982.  * Enumerate Modes with different refresh rates.  EnumDisplayModes guarantees
  3983.  * that a particular mode will be enumerated only once.  This flag specifies whether
  3984.  * the refresh rate is taken into account when determining if a mode is unique.
  3985.  */
  3986. #define DDEDM_REFRESHRATES                      0x00000001l
  3987.  
  3988. /*
  3989.  * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA
  3990.  * modes such as mode 0x13 in addition to the usual ModeX modes (which are always
  3991.  * enumerated if the application has previously called SetCooperativeLevel with the
  3992.  * DDSCL_ALLOWMODEX flag set).
  3993.  */
  3994. #define DDEDM_STANDARDVGAMODES                  0x00000002L
  3995.  
  3996.  
  3997. /****************************************************************************
  3998.  *
  3999.  * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  4000.  *
  4001.  ****************************************************************************/
  4002.  
  4003. /*
  4004.  * Exclusive mode owner will be responsible for the entire primary surface.
  4005.  * GDI can be ignored. used with DD
  4006.  */
  4007. #define DDSCL_FULLSCREEN                        0x00000001l
  4008.  
  4009. /*
  4010.  * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
  4011.  */
  4012. #define DDSCL_ALLOWREBOOT                       0x00000002l
  4013.  
  4014. /*
  4015.  * prevents DDRAW from modifying the application window.
  4016.  * prevents DDRAW from minimize/restore the application window on activation.
  4017.  */
  4018. #define DDSCL_NOWINDOWCHANGES                   0x00000004l
  4019.  
  4020. /*
  4021.  * app wants to work as a regular Windows application
  4022.  */
  4023. #define DDSCL_NORMAL                            0x00000008l
  4024.  
  4025. /*
  4026.  * app wants exclusive access
  4027.  */
  4028. #define DDSCL_EXCLUSIVE                         0x00000010l
  4029.  
  4030.  
  4031. /*
  4032.  * app can deal with non-windows display modes
  4033.  */
  4034. #define DDSCL_ALLOWMODEX                        0x00000040l
  4035.  
  4036. /*
  4037.  * this window will receive the focus messages
  4038.  */
  4039. #define DDSCL_SETFOCUSWINDOW                    0x00000080l
  4040.  
  4041. /*
  4042.  * this window is associated with the DDRAW object and will
  4043.  * cover the screen in fullscreen mode
  4044.  */
  4045. #define DDSCL_SETDEVICEWINDOW                   0x00000100l
  4046.  
  4047. /*
  4048.  * app wants DDRAW to create a window to be associated with the
  4049.  * DDRAW object
  4050.  */
  4051. #define DDSCL_CREATEDEVICEWINDOW                0x00000200l
  4052.  
  4053. /*
  4054.  * App explicitly asks DDRAW/D3D to be multithread safe. This makes D3D
  4055.  * take the global crtisec more frequently.
  4056.  */
  4057. #define DDSCL_MULTITHREADED                     0x00000400l
  4058.  
  4059. /*
  4060.  * App specifies that it would like to keep the FPU set up for optimal Direct3D
  4061.  * performance (single precision and exceptions disabled) so Direct3D
  4062.  * does not need to explicitly set the FPU each time. This is assumed by
  4063.  * default in DirectX 7. See also DDSCL_FPUPRESERVE
  4064.  */
  4065. #define DDSCL_FPUSETUP                          0x00000800l
  4066.  
  4067. /*
  4068.  * App specifies that it needs either double precision FPU or FPU exceptions
  4069.  * enabled. This makes Direct3D explicitly set the FPU state eah time it is
  4070.  * called. Setting the flag will reduce Direct3D performance. The flag is
  4071.  * assumed by default in DirectX 6 and earlier. See also DDSCL_FPUSETUP
  4072.  */
  4073. #define DDSCL_FPUPRESERVE                          0x00001000l
  4074.  
  4075.  
  4076. /****************************************************************************
  4077.  *
  4078.  * DIRECTDRAW BLT FLAGS
  4079.  *
  4080.  ****************************************************************************/
  4081.  
  4082. /*
  4083.  * Use the alpha information in the pixel format or the alpha channel surface
  4084.  * attached to the destination surface as the alpha channel for this blt.
  4085.  */
  4086. #define DDBLT_ALPHADEST                         0x00000001l
  4087.  
  4088. /*
  4089.  * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
  4090.  * for the destination surface for this blt.
  4091.  */
  4092. #define DDBLT_ALPHADESTCONSTOVERRIDE            0x00000002l
  4093.  
  4094. /*
  4095.  * The NEG suffix indicates that the destination surface becomes more
  4096.  * transparent as the alpha value increases. (0 is opaque)
  4097.  */
  4098. #define DDBLT_ALPHADESTNEG                      0x00000004l
  4099.  
  4100. /*
  4101.  * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
  4102.  * channel for the destination for this blt.
  4103.  */
  4104. #define DDBLT_ALPHADESTSURFACEOVERRIDE          0x00000008l
  4105.  
  4106. /*
  4107.  * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
  4108.  * for the edges of the image that border the color key colors.
  4109.  */
  4110. #define DDBLT_ALPHAEDGEBLEND                    0x00000010l
  4111.  
  4112. /*
  4113.  * Use the alpha information in the pixel format or the alpha channel surface
  4114.  * attached to the source surface as the alpha channel for this blt.
  4115.  */
  4116. #define DDBLT_ALPHASRC                          0x00000020l
  4117.  
  4118. /*
  4119.  * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
  4120.  * for the source for this blt.
  4121.  */
  4122. #define DDBLT_ALPHASRCCONSTOVERRIDE             0x00000040l
  4123.  
  4124. /*
  4125.  * The NEG suffix indicates that the source surface becomes more transparent
  4126.  * as the alpha value increases. (0 is opaque)
  4127.  */
  4128. #define DDBLT_ALPHASRCNEG                       0x00000080l
  4129.  
  4130. /*
  4131.  * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
  4132.  * for the source for this blt.
  4133.  */
  4134. #define DDBLT_ALPHASRCSURFACEOVERRIDE           0x00000100l
  4135.  
  4136. /*
  4137.  * Do this blt asynchronously through the FIFO in the order received.  If
  4138.  * there is no room in the hardware FIFO fail the call.
  4139.  */
  4140. #define DDBLT_ASYNC                             0x00000200l
  4141.  
  4142. /*
  4143.  * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
  4144.  * to fill the destination rectangle on the destination surface with.
  4145.  */
  4146. #define DDBLT_COLORFILL                         0x00000400l
  4147.  
  4148. /*
  4149.  * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
  4150.  * to use for the blt.
  4151.  */
  4152. #define DDBLT_DDFX                              0x00000800l
  4153.  
  4154. /*
  4155.  * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
  4156.  * that are not part of the Win32 API.
  4157.  */
  4158. #define DDBLT_DDROPS                            0x00001000l
  4159.  
  4160. /*
  4161.  * Use the color key associated with the destination surface.
  4162.  */
  4163. #define DDBLT_KEYDEST                           0x00002000l
  4164.  
  4165. /*
  4166.  * Use the dckDestColorkey field in the DDBLTFX structure as the color key
  4167.  * for the destination surface.
  4168.  */
  4169. #define DDBLT_KEYDESTOVERRIDE                   0x00004000l
  4170.  
  4171. /*
  4172.  * Use the color key associated with the source surface.
  4173.  */
  4174. #define DDBLT_KEYSRC                            0x00008000l
  4175.  
  4176. /*
  4177.  * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
  4178.  * for the source surface.
  4179.  */
  4180. #define DDBLT_KEYSRCOVERRIDE                    0x00010000l
  4181.  
  4182. /*
  4183.  * Use the dwROP field in the DDBLTFX structure for the raster operation
  4184.  * for this blt.  These ROPs are the same as the ones defined in the Win32 API.
  4185.  */
  4186. #define DDBLT_ROP                               0x00020000l
  4187.  
  4188. /*
  4189.  * Use the dwRotationAngle field in the DDBLTFX structure as the angle
  4190.  * (specified in 1/100th of a degree) to rotate the surface.
  4191.  */
  4192. #define DDBLT_ROTATIONANGLE                     0x00040000l
  4193.  
  4194. /*
  4195.  * Z-buffered blt using the z-buffers attached to the source and destination
  4196.  * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  4197.  * z-buffer opcode.
  4198.  */
  4199. #define DDBLT_ZBUFFER                           0x00080000l
  4200.  
  4201. /*
  4202.  * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  4203.  * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  4204.  * for the destination.
  4205.  */
  4206. #define DDBLT_ZBUFFERDESTCONSTOVERRIDE          0x00100000l
  4207.  
  4208. /*
  4209.  * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  4210.  * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  4211.  * respectively for the destination.
  4212.  */
  4213. #define DDBLT_ZBUFFERDESTOVERRIDE               0x00200000l
  4214.  
  4215. /*
  4216.  * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  4217.  * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  4218.  * for the source.
  4219.  */
  4220. #define DDBLT_ZBUFFERSRCCONSTOVERRIDE           0x00400000l
  4221.  
  4222. /*
  4223.  * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  4224.  * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  4225.  * respectively for the source.
  4226.  */
  4227. #define DDBLT_ZBUFFERSRCOVERRIDE                0x00800000l
  4228.  
  4229. /*
  4230.  * wait until the device is ready to handle the blt
  4231.  * this will cause blt to not return DDERR_WASSTILLDRAWING
  4232.  */
  4233. #define DDBLT_WAIT                              0x01000000l
  4234.  
  4235. /*
  4236.  * Uses the dwFillDepth field in the DDBLTFX structure as the depth value
  4237.  * to fill the destination rectangle on the destination Z-buffer surface
  4238.  * with.
  4239.  */
  4240. #define DDBLT_DEPTHFILL                         0x02000000l
  4241.  
  4242.  
  4243. /*
  4244.  * wait until the device is ready to handle the blt
  4245.  * this will cause blt to not return DDERR_WASSTILLDRAWING
  4246.  */
  4247. #define DDBLT_DONOTWAIT                         0x08000000l
  4248.  
  4249.  
  4250. /****************************************************************************
  4251.  *
  4252.  * BLTFAST FLAGS
  4253.  *
  4254.  ****************************************************************************/
  4255.  
  4256. #define DDBLTFAST_NOCOLORKEY                    0x00000000
  4257. #define DDBLTFAST_SRCCOLORKEY                   0x00000001
  4258. #define DDBLTFAST_DESTCOLORKEY                  0x00000002
  4259. #define DDBLTFAST_WAIT                          0x00000010
  4260. #define DDBLTFAST_DONOTWAIT                     0x00000020
  4261.  
  4262.  
  4263.  
  4264. /****************************************************************************
  4265.  *
  4266.  * FLIP FLAGS
  4267.  *
  4268.  ****************************************************************************/
  4269.  
  4270. #define DDFLIP_WAIT                          0x00000001L
  4271.  
  4272. /*
  4273.  * Indicates that the target surface contains the even field of video data.
  4274.  * This flag is only valid with an overlay surface.
  4275.  */
  4276. #define DDFLIP_EVEN                          0x00000002L
  4277.  
  4278. /*
  4279.  * Indicates that the target surface contains the odd field of video data.
  4280.  * This flag is only valid with an overlay surface.
  4281.  */
  4282. #define DDFLIP_ODD                           0x00000004L
  4283.  
  4284. /*
  4285.  * Causes DirectDraw to perform the physical flip immediately and return
  4286.  * to the application. Typically, what was the front buffer but is now the back
  4287.  * buffer will still be visible (depending on timing) until the next vertical
  4288.  * retrace. Subsequent operations involving the two flipped surfaces will
  4289.  * not check to see if the physical flip has finished (i.e. will not return
  4290.  * DDERR_WASSTILLDRAWING for that reason (but may for other reasons)).
  4291.  * This allows an application to perform Flips at a higher frequency than the
  4292.  * monitor refresh rate, but may introduce visible artifacts.
  4293.  * Only effective if DDCAPS2_FLIPNOVSYNC is set. If that bit is not set,
  4294.  * DDFLIP_NOVSYNC has no effect.
  4295.  */
  4296. #define DDFLIP_NOVSYNC                       0x00000008L
  4297.  
  4298.  
  4299. /*
  4300.  * Flip Interval Flags. These flags indicate how many vertical retraces to wait between
  4301.  * each flip. The default is one. DirectDraw will return DDERR_WASSTILLDRAWING for each
  4302.  * surface involved in the flip until the specified number of vertical retraces has
  4303.  * ocurred. Only effective if DDCAPS2_FLIPINTERVAL is set. If that bit is not set,
  4304.  * DDFLIP_INTERVALn has no effect.
  4305.  */
  4306.  
  4307. /*
  4308.  * DirectDraw will flip on every other vertical sync
  4309.  */
  4310. #define DDFLIP_INTERVAL2                     0x02000000L
  4311.  
  4312.  
  4313. /*
  4314.  * DirectDraw will flip on every third vertical sync
  4315.  */
  4316. #define DDFLIP_INTERVAL3                     0x03000000L
  4317.  
  4318.  
  4319. /*
  4320.  * DirectDraw will flip on every fourth vertical sync
  4321.  */
  4322. #define DDFLIP_INTERVAL4                     0x04000000L
  4323.  
  4324. /*
  4325.  * DirectDraw will flip and display a main stereo surface
  4326.  */
  4327. #define DDFLIP_STEREO                        0x00000010L
  4328.  
  4329. /*
  4330.  * On IDirectDrawSurface7 and higher interfaces, the default is DDFLIP_WAIT. If you wish
  4331.  * to override the default and use time when the accelerator is busy (as denoted by
  4332.  * the DDERR_WASSTILLDRAWING return code) then use DDFLIP_DONOTWAIT.
  4333.  */
  4334. #define DDFLIP_DONOTWAIT                     0x00000020L
  4335.  
  4336.  
  4337.  
  4338. /****************************************************************************
  4339.  *
  4340.  * DIRECTDRAW SURFACE OVERLAY FLAGS
  4341.  *
  4342.  ****************************************************************************/
  4343.  
  4344. /*
  4345.  * Use the alpha information in the pixel format or the alpha channel surface
  4346.  * attached to the destination surface as the alpha channel for the
  4347.  * destination overlay.
  4348.  */
  4349. #define DDOVER_ALPHADEST                        0x00000001l
  4350.  
  4351. /*
  4352.  * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
  4353.  * destination alpha channel for this overlay.
  4354.  */
  4355. #define DDOVER_ALPHADESTCONSTOVERRIDE           0x00000002l
  4356.  
  4357. /*
  4358.  * The NEG suffix indicates that the destination surface becomes more
  4359.  * transparent as the alpha value increases.
  4360.  */
  4361. #define DDOVER_ALPHADESTNEG                     0x00000004l
  4362.  
  4363. /*
  4364.  * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
  4365.  * channel destination for this overlay.
  4366.  */
  4367. #define DDOVER_ALPHADESTSURFACEOVERRIDE         0x00000008l
  4368.  
  4369. /*
  4370.  * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
  4371.  * channel for the edges of the image that border the color key colors.
  4372.  */
  4373. #define DDOVER_ALPHAEDGEBLEND                   0x00000010l
  4374.  
  4375. /*
  4376.  * Use the alpha information in the pixel format or the alpha channel surface
  4377.  * attached to the source surface as the source alpha channel for this overlay.
  4378.  */
  4379. #define DDOVER_ALPHASRC                         0x00000020l
  4380.  
  4381. /*
  4382.  * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
  4383.  * alpha channel for this overlay.
  4384.  */
  4385. #define DDOVER_ALPHASRCCONSTOVERRIDE            0x00000040l
  4386.  
  4387. /*
  4388.  * The NEG suffix indicates that the source surface becomes more transparent
  4389.  * as the alpha value increases.
  4390.  */
  4391. #define DDOVER_ALPHASRCNEG                      0x00000080l
  4392.  
  4393. /*
  4394.  * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
  4395.  * source for this overlay.
  4396.  */
  4397. #define DDOVER_ALPHASRCSURFACEOVERRIDE          0x00000100l
  4398.  
  4399. /*
  4400.  * Turn this overlay off.
  4401.  */
  4402. #define DDOVER_HIDE                             0x00000200l
  4403.  
  4404. /*
  4405.  * Use the color key associated with the destination surface.
  4406.  */
  4407. #define DDOVER_KEYDEST                          0x00000400l
  4408.  
  4409. /*
  4410.  * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
  4411.  * for the destination surface
  4412.  */
  4413. #define DDOVER_KEYDESTOVERRIDE                  0x00000800l
  4414.  
  4415. /*
  4416.  * Use the color key associated with the source surface.
  4417.  */
  4418. #define DDOVER_KEYSRC                           0x00001000l
  4419.  
  4420. /*
  4421.  * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
  4422.  * for the source surface.
  4423.  */
  4424. #define DDOVER_KEYSRCOVERRIDE                   0x00002000l
  4425.  
  4426. /*
  4427.  * Turn this overlay on.
  4428.  */
  4429. #define DDOVER_SHOW                             0x00004000l
  4430.  
  4431. /*
  4432.  * Add a dirty rect to an emulated overlayed surface.
  4433.  */
  4434. #define DDOVER_ADDDIRTYRECT                     0x00008000l
  4435.  
  4436. /*
  4437.  * Redraw all dirty rects on an emulated overlayed surface.
  4438.  */
  4439. #define DDOVER_REFRESHDIRTYRECTS                0x00010000l
  4440.  
  4441. /*
  4442.  * Redraw the entire surface on an emulated overlayed surface.
  4443.  */
  4444. #define DDOVER_REFRESHALL                      0x00020000l
  4445.  
  4446.  
  4447. /*
  4448.  * Use the overlay FX flags to define special overlay FX
  4449.  */
  4450. #define DDOVER_DDFX                             0x00080000l
  4451.  
  4452. /*
  4453.  * Autoflip the overlay when ever the video port autoflips
  4454.  */
  4455. #define DDOVER_AUTOFLIP                         0x00100000l
  4456.  
  4457. /*
  4458.  * Display each field of video port data individually without
  4459.  * causing any jittery artifacts
  4460.  */
  4461. #define DDOVER_BOB                              0x00200000l
  4462.  
  4463. /*
  4464.  * Indicates that bob/weave decisions should not be overridden by other
  4465.  * interfaces.
  4466.  */
  4467. #define DDOVER_OVERRIDEBOBWEAVE                 0x00400000l
  4468.  
  4469. /*
  4470.  * Indicates that the surface memory is composed of interleaved fields.
  4471.  */
  4472. #define DDOVER_INTERLEAVED                      0x00800000l
  4473.  
  4474. /*
  4475.  * Indicates that bob will be performed using hardware rather than
  4476.  * software or emulated.
  4477.  */
  4478. #define DDOVER_BOBHARDWARE                      0x01000000l
  4479.  
  4480. /*
  4481.  * Indicates that overlay FX structure contains valid ARGB scaling factors.
  4482.  */
  4483. #define DDOVER_ARGBSCALEFACTORS                 0x02000000l
  4484.  
  4485. /*
  4486.  * Indicates that ARGB scaling factors can be degraded to fit driver capabilities.
  4487.  */
  4488. #define DDOVER_DEGRADEARGBSCALING               0x04000000l
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495.  
  4496.  
  4497. /****************************************************************************
  4498.  *
  4499.  * DIRECTDRAWSURFACE LOCK FLAGS
  4500.  *
  4501.  ****************************************************************************/
  4502.  
  4503. /*
  4504.  * The default.  Set to indicate that Lock should return a valid memory pointer
  4505.  * to the top of the specified rectangle.  If no rectangle is specified then a
  4506.  * pointer to the top of the surface is returned.
  4507.  */
  4508. #define DDLOCK_SURFACEMEMORYPTR                 0x00000000L     // default
  4509.  
  4510. /*
  4511.  * Set to indicate that Lock should wait until it can obtain a valid memory
  4512.  * pointer before returning.  If this bit is set, Lock will never return
  4513.  * DDERR_WASSTILLDRAWING.
  4514.  */
  4515. #define DDLOCK_WAIT                             0x00000001L
  4516.  
  4517. /*
  4518.  * Set if an event handle is being passed to Lock.  Lock will trigger the event
  4519.  * when it can return the surface memory pointer requested.
  4520.  */
  4521. #define DDLOCK_EVENT                            0x00000002L
  4522.  
  4523. /*
  4524.  * Indicates that the surface being locked will only be read from.
  4525.  */
  4526. #define DDLOCK_READONLY                         0x00000010L
  4527.  
  4528. /*
  4529.  * Indicates that the surface being locked will only be written to
  4530.  */
  4531. #define DDLOCK_WRITEONLY                        0x00000020L
  4532.  
  4533.  
  4534. /*
  4535.  * Indicates that a system wide lock should not be taken when this surface
  4536.  * is locked. This has several advantages (cursor responsiveness, ability
  4537.  * to call more Windows functions, easier debugging) when locking video
  4538.  * memory surfaces. However, an application specifying this flag must
  4539.  * comply with a number of conditions documented in the help file.
  4540.  * Furthermore, this flag cannot be specified when locking the primary.
  4541.  */
  4542. #define DDLOCK_NOSYSLOCK                        0x00000800L
  4543.  
  4544. /*
  4545.  * Used only with Direct3D Vertex Buffer Locks. Indicates that no vertices
  4546.  * that were referred to in Draw*PrimtiveVB calls since the start of the
  4547.  * frame (or the last lock without this flag) will be modified during the
  4548.  * lock. This can be useful when one is only appending data to the vertex
  4549.  * buffer
  4550.  */
  4551. #define DDLOCK_NOOVERWRITE                      0x00001000L
  4552.  
  4553. /*
  4554.  * Indicates that no assumptions will be made about the contents of the 
  4555.  * surface or vertex buffer during this lock.
  4556.  * This enables two things:
  4557.  * -    Direct3D or the driver may provide an alternative memory
  4558.  *      area as the vertex buffer. This is useful when one plans to clear the
  4559.  *      contents of the vertex buffer and fill in new data.
  4560.  * -    Drivers sometimes store surface data in a re-ordered format.
  4561.  *      When the application locks the surface, the driver is forced to un-re-order
  4562.  *      the surface data before allowing the application to see the surface contents.
  4563.  *      This flag is a hint to the driver that it can skip the un-re-ordering process
  4564.  *      since the application plans to overwrite every single pixel in the surface
  4565.  *      or locked rectangle (and so erase any un-re-ordered pixels anyway).
  4566.  *      Applications should always set this flag when they intend to overwrite the entire
  4567.  *      surface or locked rectangle.
  4568.  */
  4569. #define DDLOCK_DISCARDCONTENTS                  0x00002000L
  4570.  /*
  4571.   * DDLOCK_OKTOSWAP is an older, less informative name for DDLOCK_DISCARDCONTENTS
  4572.   */
  4573. #define DDLOCK_OKTOSWAP                         0x00002000L
  4574.  
  4575. /*
  4576.  * On IDirectDrawSurface7 and higher interfaces, the default is DDLOCK_WAIT. If you wish
  4577.  * to override the default and use time when the accelerator is busy (as denoted by
  4578.  * the DDERR_WASSTILLDRAWING return code) then use DDLOCK_DONOTWAIT.
  4579.  */
  4580. #define DDLOCK_DONOTWAIT                        0x00004000L
  4581.  
  4582.  
  4583.  
  4584. /****************************************************************************
  4585.  *
  4586.  * DIRECTDRAWSURFACE PAGELOCK FLAGS
  4587.  *
  4588.  ****************************************************************************/
  4589.  
  4590. /*
  4591.  * No flags defined at present
  4592.  */
  4593.  
  4594.  
  4595. /****************************************************************************
  4596.  *
  4597.  * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
  4598.  *
  4599.  ****************************************************************************/
  4600.  
  4601. /*
  4602.  * No flags defined at present
  4603.  */
  4604.  
  4605.  
  4606. /****************************************************************************
  4607.  *
  4608.  * DIRECTDRAWSURFACE BLT FX FLAGS
  4609.  *
  4610.  ****************************************************************************/
  4611.  
  4612. /*
  4613.  * If stretching, use arithmetic stretching along the Y axis for this blt.
  4614.  */
  4615. #define DDBLTFX_ARITHSTRETCHY                   0x00000001l
  4616.  
  4617. /*
  4618.  * Do this blt mirroring the surface left to right.  Spin the
  4619.  * surface around its y-axis.
  4620.  */
  4621. #define DDBLTFX_MIRRORLEFTRIGHT                 0x00000002l
  4622.  
  4623. /*
  4624.  * Do this blt mirroring the surface up and down.  Spin the surface
  4625.  * around its x-axis.
  4626.  */
  4627. #define DDBLTFX_MIRRORUPDOWN                    0x00000004l
  4628.  
  4629. /*
  4630.  * Schedule this blt to avoid tearing.
  4631.  */
  4632. #define DDBLTFX_NOTEARING                       0x00000008l
  4633.  
  4634. /*
  4635.  * Do this blt rotating the surface one hundred and eighty degrees.
  4636.  */
  4637. #define DDBLTFX_ROTATE180                       0x00000010l
  4638.  
  4639. /*
  4640.  * Do this blt rotating the surface two hundred and seventy degrees.
  4641.  */
  4642. #define DDBLTFX_ROTATE270                       0x00000020l
  4643.  
  4644. /*
  4645.  * Do this blt rotating the surface ninety degrees.
  4646.  */
  4647. #define DDBLTFX_ROTATE90                        0x00000040l
  4648.  
  4649. /*
  4650.  * Do this z blt using dwZBufferLow and dwZBufferHigh as  range values
  4651.  * specified to limit the bits copied from the source surface.
  4652.  */
  4653. #define DDBLTFX_ZBUFFERRANGE                    0x00000080l
  4654.  
  4655. /*
  4656.  * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  4657.  * before comparing it with the desting z values.
  4658.  */
  4659. #define DDBLTFX_ZBUFFERBASEDEST                 0x00000100l
  4660.  
  4661. /****************************************************************************
  4662.  *
  4663.  * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  4664.  *
  4665.  ****************************************************************************/
  4666.  
  4667. /*
  4668.  * If stretching, use arithmetic stretching along the Y axis for this overlay.
  4669.  */
  4670. #define DDOVERFX_ARITHSTRETCHY                  0x00000001l
  4671.  
  4672. /*
  4673.  * Mirror the overlay across the vertical axis
  4674.  */
  4675. #define DDOVERFX_MIRRORLEFTRIGHT                0x00000002l
  4676.  
  4677. /*
  4678.  * Mirror the overlay across the horizontal axis
  4679.  */
  4680. #define DDOVERFX_MIRRORUPDOWN                   0x00000004l
  4681.  
  4682.  
  4683. /****************************************************************************
  4684.  *
  4685.  * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  4686.  *
  4687.  ****************************************************************************/
  4688.  
  4689. /*
  4690.  * return when the vertical blank interval begins
  4691.  */
  4692. #define DDWAITVB_BLOCKBEGIN                     0x00000001l
  4693.  
  4694. /*
  4695.  * set up an event to trigger when the vertical blank begins
  4696.  */
  4697. #define DDWAITVB_BLOCKBEGINEVENT                0x00000002l
  4698.  
  4699. /*
  4700.  * return when the vertical blank interval ends and display begins
  4701.  */
  4702. #define DDWAITVB_BLOCKEND                       0x00000004l
  4703.  
  4704. /****************************************************************************
  4705.  *
  4706.  * DIRECTDRAW GETFLIPSTATUS FLAGS
  4707.  *
  4708.  ****************************************************************************/
  4709.  
  4710. /*
  4711.  * is it OK to flip now?
  4712.  */
  4713. #define DDGFS_CANFLIP                   0x00000001l
  4714.  
  4715. /*
  4716.  * is the last flip finished?
  4717.  */
  4718. #define DDGFS_ISFLIPDONE                0x00000002l
  4719.  
  4720. /****************************************************************************
  4721.  *
  4722.  * DIRECTDRAW GETBLTSTATUS FLAGS
  4723.  *
  4724.  ****************************************************************************/
  4725.  
  4726. /*
  4727.  * is it OK to blt now?
  4728.  */
  4729. #define DDGBS_CANBLT                    0x00000001l
  4730.  
  4731. /*
  4732.  * is the blt to the surface finished?
  4733.  */
  4734. #define DDGBS_ISBLTDONE                 0x00000002l
  4735.  
  4736.  
  4737. /****************************************************************************
  4738.  *
  4739.  * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  4740.  *
  4741.  ****************************************************************************/
  4742.  
  4743. /*
  4744.  * Enumerate overlays back to front.
  4745.  */
  4746. #define DDENUMOVERLAYZ_BACKTOFRONT      0x00000000l
  4747.  
  4748. /*
  4749.  * Enumerate overlays front to back
  4750.  */
  4751. #define DDENUMOVERLAYZ_FRONTTOBACK      0x00000001l
  4752.  
  4753. /****************************************************************************
  4754.  *
  4755.  * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  4756.  *
  4757.  ****************************************************************************/
  4758.  
  4759. /*
  4760.  * Send overlay to front
  4761.  */
  4762. #define DDOVERZ_SENDTOFRONT             0x00000000l
  4763.  
  4764. /*
  4765.  * Send overlay to back
  4766.  */
  4767. #define DDOVERZ_SENDTOBACK              0x00000001l
  4768.  
  4769. /*
  4770.  * Move Overlay forward
  4771.  */
  4772. #define DDOVERZ_MOVEFORWARD             0x00000002l
  4773.  
  4774. /*
  4775.  * Move Overlay backward
  4776.  */
  4777. #define DDOVERZ_MOVEBACKWARD            0x00000003l
  4778.  
  4779. /*
  4780.  * Move Overlay in front of relative surface
  4781.  */
  4782. #define DDOVERZ_INSERTINFRONTOF         0x00000004l
  4783.  
  4784. /*
  4785.  * Move Overlay in back of relative surface
  4786.  */
  4787. #define DDOVERZ_INSERTINBACKOF          0x00000005l
  4788.  
  4789.  
  4790.  
  4791. /****************************************************************************
  4792.  *
  4793.  * DIRECTDRAW SETGAMMARAMP FLAGS
  4794.  *
  4795.  ****************************************************************************/
  4796.  
  4797. /*
  4798.  * Request calibrator to adjust the gamma ramp according to the physical
  4799.  * properties of the display so that the result should appear identical
  4800.  * on all systems.
  4801.  */
  4802. #define DDSGR_CALIBRATE                        0x00000001L
  4803.  
  4804.  
  4805. /****************************************************************************
  4806.  *
  4807.  * DIRECTDRAW STARTMODETEST FLAGS
  4808.  *
  4809.  ****************************************************************************/
  4810.  
  4811. /*
  4812.  * Indicates that the mode being tested has passed
  4813.  */
  4814. #define DDSMT_ISTESTREQUIRED                   0x00000001L
  4815.  
  4816.  
  4817. /****************************************************************************
  4818.  *
  4819.  * DIRECTDRAW EVALUATEMODE FLAGS
  4820.  *
  4821.  ****************************************************************************/
  4822.  
  4823. /*
  4824.  * Indicates that the mode being tested has passed
  4825.  */
  4826. #define DDEM_MODEPASSED                        0x00000001L
  4827.  
  4828. /*
  4829.  * Indicates that the mode being tested has failed
  4830.  */
  4831. #define DDEM_MODEFAILED                        0x00000002L
  4832.  
  4833.  
  4834. /*===========================================================================
  4835.  *
  4836.  *
  4837.  * DIRECTDRAW RETURN CODES
  4838.  *
  4839.  * The return values from DirectDraw Commands and Surface that return an HRESULT
  4840.  * are codes from DirectDraw concerning the results of the action
  4841.  * requested by DirectDraw.
  4842.  *
  4843.  *==========================================================================*/
  4844.  
  4845. /*
  4846.  * Status is OK
  4847.  *
  4848.  * Issued by: DirectDraw Commands and all callbacks
  4849.  */
  4850. #define DD_OK                                   0
  4851. #define DD_FALSE                                S_FALSE
  4852.  
  4853. /****************************************************************************
  4854.  *
  4855.  * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  4856.  *
  4857.  * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  4858.  * DIRECTDRAWSURFACE object enumerations.   They can only be returned by
  4859.  * enumeration callback routines.
  4860.  *
  4861.  ****************************************************************************/
  4862.  
  4863. /*
  4864.  * stop the enumeration
  4865.  */
  4866. #define DDENUMRET_CANCEL                        0
  4867.  
  4868. /*
  4869.  * continue the enumeration
  4870.  */
  4871. #define DDENUMRET_OK                            1
  4872.  
  4873. /****************************************************************************
  4874.  *
  4875.  * DIRECTDRAW ERRORS
  4876.  *
  4877.  * Errors are represented by negative values and cannot be combined.
  4878.  *
  4879.  ****************************************************************************/
  4880.  
  4881. /*
  4882.  * This object is already initialized
  4883.  */
  4884. #define DDERR_ALREADYINITIALIZED                MAKE_DDHRESULT( 5 )
  4885.  
  4886. /*
  4887.  * This surface can not be attached to the requested surface.
  4888.  */
  4889. #define DDERR_CANNOTATTACHSURFACE               MAKE_DDHRESULT( 10 )
  4890.  
  4891. /*
  4892.  * This surface can not be detached from the requested surface.
  4893.  */
  4894. #define DDERR_CANNOTDETACHSURFACE               MAKE_DDHRESULT( 20 )
  4895.  
  4896. /*
  4897.  * Support is currently not available.
  4898.  */
  4899. #define DDERR_CURRENTLYNOTAVAIL                 MAKE_DDHRESULT( 40 )
  4900.  
  4901. /*
  4902.  * An exception was encountered while performing the requested operation
  4903.  */
  4904. #define DDERR_EXCEPTION                         MAKE_DDHRESULT( 55 )
  4905.  
  4906. /*
  4907.  * Generic failure.
  4908.  */
  4909. #define DDERR_GENERIC                           E_FAIL
  4910.  
  4911. /*
  4912.  * Height of rectangle provided is not a multiple of reqd alignment
  4913.  */
  4914. #define DDERR_HEIGHTALIGN                       MAKE_DDHRESULT( 90 )
  4915.  
  4916. /*
  4917.  * Unable to match primary surface creation request with existing
  4918.  * primary surface.
  4919.  */
  4920. #define DDERR_INCOMPATIBLEPRIMARY               MAKE_DDHRESULT( 95 )
  4921.  
  4922. /*
  4923.  * One or more of the caps bits passed to the callback are incorrect.
  4924.  */
  4925. #define DDERR_INVALIDCAPS                       MAKE_DDHRESULT( 100 )
  4926.  
  4927. /*
  4928.  * DirectDraw does not support provided Cliplist.
  4929.  */
  4930. #define DDERR_INVALIDCLIPLIST                   MAKE_DDHRESULT( 110 )
  4931.  
  4932. /*
  4933.  * DirectDraw does not support the requested mode
  4934.  */
  4935. #define DDERR_INVALIDMODE                       MAKE_DDHRESULT( 120 )
  4936.  
  4937. /*
  4938.  * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
  4939.  */
  4940. #define DDERR_INVALIDOBJECT                     MAKE_DDHRESULT( 130 )
  4941.  
  4942. /*
  4943.  * One or more of the parameters passed to the callback function are
  4944.  * incorrect.
  4945.  */
  4946. #define DDERR_INVALIDPARAMS                     E_INVALIDARG
  4947.  
  4948. /*
  4949.  * pixel format was invalid as specified
  4950.  */
  4951. #define DDERR_INVALIDPIXELFORMAT                MAKE_DDHRESULT( 145 )
  4952.  
  4953. /*
  4954.  * Rectangle provided was invalid.
  4955.  */
  4956. #define DDERR_INVALIDRECT                       MAKE_DDHRESULT( 150 )
  4957.  
  4958. /*
  4959.  * Operation could not be carried out because one or more surfaces are locked
  4960.  */
  4961. #define DDERR_LOCKEDSURFACES                    MAKE_DDHRESULT( 160 )
  4962.  
  4963. /*
  4964.  * There is no 3D present.
  4965.  */
  4966. #define DDERR_NO3D                              MAKE_DDHRESULT( 170 )
  4967.  
  4968. /*
  4969.  * Operation could not be carried out because there is no alpha accleration
  4970.  * hardware present or available.
  4971.  */
  4972. #define DDERR_NOALPHAHW                         MAKE_DDHRESULT( 180 )
  4973.  
  4974. /*
  4975.  * Operation could not be carried out because there is no stereo
  4976.  * hardware present or available.
  4977.  */
  4978. #define DDERR_NOSTEREOHARDWARE          MAKE_DDHRESULT( 181 )
  4979.  
  4980. /*
  4981.  * Operation could not be carried out because there is no hardware
  4982.  * present which supports stereo surfaces
  4983.  */
  4984. #define DDERR_NOSURFACELEFT                             MAKE_DDHRESULT( 182 )
  4985.  
  4986.  
  4987.  
  4988. /*
  4989.  * no clip list available
  4990.  */
  4991. #define DDERR_NOCLIPLIST                        MAKE_DDHRESULT( 205 )
  4992.  
  4993. /*
  4994.  * Operation could not be carried out because there is no color conversion
  4995.  * hardware present or available.
  4996.  */
  4997. #define DDERR_NOCOLORCONVHW                     MAKE_DDHRESULT( 210 )
  4998.  
  4999. /*
  5000.  * Create function called without DirectDraw object method SetCooperativeLevel
  5001.  * being called.
  5002.  */
  5003. #define DDERR_NOCOOPERATIVELEVELSET             MAKE_DDHRESULT( 212 )
  5004.  
  5005. /*
  5006.  * Surface doesn't currently have a color key
  5007.  */
  5008. #define DDERR_NOCOLORKEY                        MAKE_DDHRESULT( 215 )
  5009.  
  5010. /*
  5011.  * Operation could not be carried out because there is no hardware support
  5012.  * of the dest color key.
  5013.  */
  5014. #define DDERR_NOCOLORKEYHW                      MAKE_DDHRESULT( 220 )
  5015.  
  5016. /*
  5017.  * No DirectDraw support possible with current display driver
  5018.  */
  5019. #define DDERR_NODIRECTDRAWSUPPORT               MAKE_DDHRESULT( 222 )
  5020.  
  5021. /*
  5022.  * Operation requires the application to have exclusive mode but the
  5023.  * application does not have exclusive mode.
  5024.  */
  5025. #define DDERR_NOEXCLUSIVEMODE                   MAKE_DDHRESULT( 225 )
  5026.  
  5027. /*
  5028.  * Flipping visible surfaces is not supported.
  5029.  */
  5030. #define DDERR_NOFLIPHW                          MAKE_DDHRESULT( 230 )
  5031.  
  5032. /*
  5033.  * There is no GDI present.
  5034.  */
  5035. #define DDERR_NOGDI                             MAKE_DDHRESULT( 240 )
  5036.  
  5037. /*
  5038.  * Operation could not be carried out because there is no hardware present
  5039.  * or available.
  5040.  */
  5041. #define DDERR_NOMIRRORHW                        MAKE_DDHRESULT( 250 )
  5042.  
  5043. /*
  5044.  * Requested item was not found
  5045.  */
  5046. #define DDERR_NOTFOUND                          MAKE_DDHRESULT( 255 )
  5047.  
  5048. /*
  5049.  * Operation could not be carried out because there is no overlay hardware
  5050.  * present or available.
  5051.  */
  5052. #define DDERR_NOOVERLAYHW                       MAKE_DDHRESULT( 260 )
  5053.  
  5054. /*
  5055.  * Operation could not be carried out because the source and destination
  5056.  * rectangles are on the same surface and overlap each other.
  5057.  */
  5058. #define DDERR_OVERLAPPINGRECTS                  MAKE_DDHRESULT( 270 )
  5059.  
  5060. /*
  5061.  * Operation could not be carried out because there is no appropriate raster
  5062.  * op hardware present or available.
  5063.  */
  5064. #define DDERR_NORASTEROPHW                      MAKE_DDHRESULT( 280 )
  5065.  
  5066. /*
  5067.  * Operation could not be carried out because there is no rotation hardware
  5068.  * present or available.
  5069.  */
  5070. #define DDERR_NOROTATIONHW                      MAKE_DDHRESULT( 290 )
  5071.  
  5072. /*
  5073.  * Operation could not be carried out because there is no hardware support
  5074.  * for stretching
  5075.  */
  5076. #define DDERR_NOSTRETCHHW                       MAKE_DDHRESULT( 310 )
  5077.  
  5078. /*
  5079.  * DirectDrawSurface is not in 4 bit color palette and the requested operation
  5080.  * requires 4 bit color palette.
  5081.  */
  5082. #define DDERR_NOT4BITCOLOR                      MAKE_DDHRESULT( 316 )
  5083.  
  5084. /*
  5085.  * DirectDrawSurface is not in 4 bit color index palette and the requested
  5086.  * operation requires 4 bit color index palette.
  5087.  */
  5088. #define DDERR_NOT4BITCOLORINDEX                 MAKE_DDHRESULT( 317 )
  5089.  
  5090. /*
  5091.  * DirectDraw Surface is not in 8 bit color mode and the requested operation
  5092.  * requires 8 bit color.
  5093.  */
  5094. #define DDERR_NOT8BITCOLOR                      MAKE_DDHRESULT( 320 )
  5095.  
  5096. /*
  5097.  * Operation could not be carried out because there is no texture mapping
  5098.  * hardware present or available.
  5099.  */
  5100. #define DDERR_NOTEXTUREHW                       MAKE_DDHRESULT( 330 )
  5101.  
  5102. /*
  5103.  * Operation could not be carried out because there is no hardware support
  5104.  * for vertical blank synchronized operations.
  5105.  */
  5106. #define DDERR_NOVSYNCHW                         MAKE_DDHRESULT( 335 )
  5107.  
  5108. /*
  5109.  * Operation could not be carried out because there is no hardware support
  5110.  * for zbuffer blting.
  5111.  */
  5112. #define DDERR_NOZBUFFERHW                       MAKE_DDHRESULT( 340 )
  5113.  
  5114. /*
  5115.  * Overlay surfaces could not be z layered based on their BltOrder because
  5116.  * the hardware does not support z layering of overlays.
  5117.  */
  5118. #define DDERR_NOZOVERLAYHW                      MAKE_DDHRESULT( 350 )
  5119.  
  5120. /*
  5121.  * The hardware needed for the requested operation has already been
  5122.  * allocated.
  5123.  */
  5124. #define DDERR_OUTOFCAPS                         MAKE_DDHRESULT( 360 )
  5125.  
  5126. /*
  5127.  * DirectDraw does not have enough memory to perform the operation.
  5128.  */
  5129. #define DDERR_OUTOFMEMORY                       E_OUTOFMEMORY
  5130.  
  5131. /*
  5132.  * DirectDraw does not have enough memory to perform the operation.
  5133.  */
  5134. #define DDERR_OUTOFVIDEOMEMORY                  MAKE_DDHRESULT( 380 )
  5135.  
  5136. /*
  5137.  * hardware does not support clipped overlays
  5138.  */
  5139. #define DDERR_OVERLAYCANTCLIP                   MAKE_DDHRESULT( 382 )
  5140.  
  5141. /*
  5142.  * Can only have ony color key active at one time for overlays
  5143.  */
  5144. #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE      MAKE_DDHRESULT( 384 )
  5145.  
  5146. /*
  5147.  * Access to this palette is being refused because the palette is already
  5148.  * locked by another thread.
  5149.  */
  5150. #define DDERR_PALETTEBUSY                       MAKE_DDHRESULT( 387 )
  5151.  
  5152. /*
  5153.  * No src color key specified for this operation.
  5154.  */
  5155. #define DDERR_COLORKEYNOTSET                    MAKE_DDHRESULT( 400 )
  5156.  
  5157. /*
  5158.  * This surface is already attached to the surface it is being attached to.
  5159.  */
  5160. #define DDERR_SURFACEALREADYATTACHED            MAKE_DDHRESULT( 410 )
  5161.  
  5162. /*
  5163.  * This surface is already a dependency of the surface it is being made a
  5164.  * dependency of.
  5165.  */
  5166. #define DDERR_SURFACEALREADYDEPENDENT           MAKE_DDHRESULT( 420 )
  5167.  
  5168. /*
  5169.  * Access to this surface is being refused because the surface is already
  5170.  * locked by another thread.
  5171.  */
  5172. #define DDERR_SURFACEBUSY                       MAKE_DDHRESULT( 430 )
  5173.  
  5174. /*
  5175.  * Access to this surface is being refused because no driver exists
  5176.  * which can supply a pointer to the surface.
  5177.  * This is most likely to happen when attempting to lock the primary
  5178.  * surface when no DCI provider is present.
  5179.  * Will also happen on attempts to lock an optimized surface.
  5180.  */
  5181. #define DDERR_CANTLOCKSURFACE                   MAKE_DDHRESULT( 435 )
  5182.  
  5183. /*
  5184.  * Access to Surface refused because Surface is obscured.
  5185.  */
  5186. #define DDERR_SURFACEISOBSCURED                 MAKE_DDHRESULT( 440 )
  5187.  
  5188. /*
  5189.  * Access to this surface is being refused because the surface is gone.
  5190.  * The DIRECTDRAWSURFACE object representing this surface should
  5191.  * have Restore called on it.
  5192.  */
  5193. #define DDERR_SURFACELOST                       MAKE_DDHRESULT( 450 )
  5194.  
  5195. /*
  5196.  * The requested surface is not attached.
  5197.  */
  5198. #define DDERR_SURFACENOTATTACHED                MAKE_DDHRESULT( 460 )
  5199.  
  5200. /*
  5201.  * Height requested by DirectDraw is too large.
  5202.  */
  5203. #define DDERR_TOOBIGHEIGHT                      MAKE_DDHRESULT( 470 )
  5204.  
  5205. /*
  5206.  * Size requested by DirectDraw is too large --  The individual height and
  5207.  * width are OK.
  5208.  */
  5209. #define DDERR_TOOBIGSIZE                        MAKE_DDHRESULT( 480 )
  5210.  
  5211. /*
  5212.  * Width requested by DirectDraw is too large.
  5213.  */
  5214. #define DDERR_TOOBIGWIDTH                       MAKE_DDHRESULT( 490 )
  5215.  
  5216. /*
  5217.  * Action not supported.
  5218.  */
  5219. #define DDERR_UNSUPPORTED                       E_NOTIMPL
  5220.  
  5221. /*
  5222.  * Pixel format requested is unsupported by DirectDraw
  5223.  */
  5224. #define DDERR_UNSUPPORTEDFORMAT                 MAKE_DDHRESULT( 510 )
  5225.  
  5226. /*
  5227.  * Bitmask in the pixel format requested is unsupported by DirectDraw
  5228.  */
  5229. #define DDERR_UNSUPPORTEDMASK                   MAKE_DDHRESULT( 520 )
  5230.  
  5231. /*
  5232.  * The specified stream contains invalid data
  5233.  */
  5234. #define DDERR_INVALIDSTREAM                     MAKE_DDHRESULT( 521 )
  5235.  
  5236. /*
  5237.  * vertical blank is in progress
  5238.  */
  5239. #define DDERR_VERTICALBLANKINPROGRESS           MAKE_DDHRESULT( 537 )
  5240.  
  5241. /*
  5242.  * Informs DirectDraw that the previous Blt which is transfering information
  5243.  * to or from this Surface is incomplete.
  5244.  */
  5245. #define DDERR_WASSTILLDRAWING                   MAKE_DDHRESULT( 540 )
  5246.  
  5247.  
  5248. /*
  5249.  * The specified surface type requires specification of the COMPLEX flag
  5250.  */
  5251. #define DDERR_DDSCAPSCOMPLEXREQUIRED            MAKE_DDHRESULT( 542 )
  5252.  
  5253.  
  5254. /*
  5255.  * Rectangle provided was not horizontally aligned on reqd. boundary
  5256.  */
  5257. #define DDERR_XALIGN                            MAKE_DDHRESULT( 560 )
  5258.  
  5259. /*
  5260.  * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
  5261.  * identifier.
  5262.  */
  5263. #define DDERR_INVALIDDIRECTDRAWGUID             MAKE_DDHRESULT( 561 )
  5264.  
  5265. /*
  5266.  * A DirectDraw object representing this driver has already been created
  5267.  * for this process.
  5268.  */
  5269. #define DDERR_DIRECTDRAWALREADYCREATED          MAKE_DDHRESULT( 562 )
  5270.  
  5271. /*
  5272.  * A hardware only DirectDraw object creation was attempted but the driver
  5273.  * did not support any hardware.
  5274.  */
  5275. #define DDERR_NODIRECTDRAWHW                    MAKE_DDHRESULT( 563 )
  5276.  
  5277. /*
  5278.  * this process already has created a primary surface
  5279.  */
  5280. #define DDERR_PRIMARYSURFACEALREADYEXISTS       MAKE_DDHRESULT( 564 )
  5281.  
  5282. /*
  5283.  * software emulation not available.
  5284.  */
  5285. #define DDERR_NOEMULATION                       MAKE_DDHRESULT( 565 )
  5286.  
  5287. /*
  5288.  * region passed to Clipper::GetClipList is too small.
  5289.  */
  5290. #define DDERR_REGIONTOOSMALL                    MAKE_DDHRESULT( 566 )
  5291.  
  5292. /*
  5293.  * an attempt was made to set a clip list for a clipper objec that
  5294.  * is already monitoring an hwnd.
  5295.  */
  5296. #define DDERR_CLIPPERISUSINGHWND                MAKE_DDHRESULT( 567 )
  5297.  
  5298. /*
  5299.  * No clipper object attached to surface object
  5300.  */
  5301. #define DDERR_NOCLIPPERATTACHED                 MAKE_DDHRESULT( 568 )
  5302.  
  5303. /*
  5304.  * Clipper notification requires an HWND or
  5305.  * no HWND has previously been set as the CooperativeLevel HWND.
  5306.  */
  5307. #define DDERR_NOHWND                            MAKE_DDHRESULT( 569 )
  5308.  
  5309. /*
  5310.  * HWND used by DirectDraw CooperativeLevel has been subclassed,
  5311.  * this prevents DirectDraw from restoring state.
  5312.  */
  5313. #define DDERR_HWNDSUBCLASSED                    MAKE_DDHRESULT( 570 )
  5314.  
  5315. /*
  5316.  * The CooperativeLevel HWND has already been set.
  5317.  * It can not be reset while the process has surfaces or palettes created.
  5318.  */
  5319. #define DDERR_HWNDALREADYSET                    MAKE_DDHRESULT( 571 )
  5320.  
  5321. /*
  5322.  * No palette object attached to this surface.
  5323.  */
  5324. #define DDERR_NOPALETTEATTACHED                 MAKE_DDHRESULT( 572 )
  5325.  
  5326. /*
  5327.  * No hardware support for 16 or 256 color palettes.
  5328.  */
  5329. #define DDERR_NOPALETTEHW                       MAKE_DDHRESULT( 573 )
  5330.  
  5331. /*
  5332.  * If a clipper object is attached to the source surface passed into a
  5333.  * BltFast call.
  5334.  */
  5335. #define DDERR_BLTFASTCANTCLIP                   MAKE_DDHRESULT( 574 )
  5336.  
  5337. /*
  5338.  * No blter.
  5339.  */
  5340. #define DDERR_NOBLTHW                           MAKE_DDHRESULT( 575 )
  5341.  
  5342. /*
  5343.  * No DirectDraw ROP hardware.
  5344.  */
  5345. #define DDERR_NODDROPSHW                        MAKE_DDHRESULT( 576 )
  5346.  
  5347. /*
  5348.  * returned when GetOverlayPosition is called on a hidden overlay
  5349.  */
  5350. #define DDERR_OVERLAYNOTVISIBLE                 MAKE_DDHRESULT( 577 )
  5351.  
  5352. /*
  5353.  * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
  5354.  * has never been called on to establish a destionation.
  5355.  */
  5356. #define DDERR_NOOVERLAYDEST                     MAKE_DDHRESULT( 578 )
  5357.  
  5358. /*
  5359.  * returned when the position of the overlay on the destionation is no longer
  5360.  * legal for that destionation.
  5361.  */
  5362. #define DDERR_INVALIDPOSITION                   MAKE_DDHRESULT( 579 )
  5363.  
  5364. /*
  5365.  * returned when an overlay member is called for a non-overlay surface
  5366.  */
  5367. #define DDERR_NOTAOVERLAYSURFACE                MAKE_DDHRESULT( 580 )
  5368.  
  5369. /*
  5370.  * An attempt was made to set the cooperative level when it was already
  5371.  * set to exclusive.
  5372.  */
  5373. #define DDERR_EXCLUSIVEMODEALREADYSET           MAKE_DDHRESULT( 581 )
  5374.  
  5375. /*
  5376.  * An attempt has been made to flip a surface that is not flippable.
  5377.  */
  5378. #define DDERR_NOTFLIPPABLE                      MAKE_DDHRESULT( 582 )
  5379.  
  5380. /*
  5381.  * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
  5382.  * created.
  5383.  */
  5384. #define DDERR_CANTDUPLICATE                     MAKE_DDHRESULT( 583 )
  5385.  
  5386. /*
  5387.  * Surface was not locked.  An attempt to unlock a surface that was not
  5388.  * locked at all, or by this process, has been attempted.
  5389.  */
  5390. #define DDERR_NOTLOCKED                         MAKE_DDHRESULT( 584 )
  5391.  
  5392. /*
  5393.  * Windows can not create any more DCs, or a DC was requested for a paltte-indexed
  5394.  * surface when the surface had no palette AND the display mode was not palette-indexed
  5395.  * (in this case DirectDraw cannot select a proper palette into the DC)
  5396.  */
  5397. #define DDERR_CANTCREATEDC                      MAKE_DDHRESULT( 585 )
  5398.  
  5399. /*
  5400.  * No DC was ever created for this surface.
  5401.  */
  5402. #define DDERR_NODC                              MAKE_DDHRESULT( 586 )
  5403.  
  5404. /*
  5405.  * This surface can not be restored because it was created in a different
  5406.  * mode.
  5407.  */
  5408. #define DDERR_WRONGMODE                         MAKE_DDHRESULT( 587 )
  5409.  
  5410. /*
  5411.  * This surface can not be restored because it is an implicitly created
  5412.  * surface.
  5413.  */
  5414. #define DDERR_IMPLICITLYCREATED                 MAKE_DDHRESULT( 588 )
  5415.  
  5416. /*
  5417.  * The surface being used is not a palette-based surface
  5418.  */
  5419. #define DDERR_NOTPALETTIZED                     MAKE_DDHRESULT( 589 )
  5420.  
  5421.  
  5422. /*
  5423.  * The display is currently in an unsupported mode
  5424.  */
  5425. #define DDERR_UNSUPPORTEDMODE                   MAKE_DDHRESULT( 590 )
  5426.  
  5427. /*
  5428.  * Operation could not be carried out because there is no mip-map
  5429.  * texture mapping hardware present or available.
  5430.  */
  5431. #define DDERR_NOMIPMAPHW                        MAKE_DDHRESULT( 591 )
  5432.  
  5433. /*
  5434.  * The requested action could not be performed because the surface was of
  5435.  * the wrong type.
  5436.  */
  5437. #define DDERR_INVALIDSURFACETYPE                MAKE_DDHRESULT( 592 )
  5438.  
  5439.  
  5440.  
  5441. /*
  5442.  * Device does not support optimized surfaces, therefore no video memory optimized surfaces
  5443.  */
  5444. #define DDERR_NOOPTIMIZEHW                      MAKE_DDHRESULT( 600 )
  5445.  
  5446. /*
  5447.  * Surface is an optimized surface, but has not yet been allocated any memory
  5448.  */
  5449. #define DDERR_NOTLOADED                         MAKE_DDHRESULT( 601 )
  5450.  
  5451. /*
  5452.  * Attempt was made to create or set a device window without first setting
  5453.  * the focus window
  5454.  */
  5455. #define DDERR_NOFOCUSWINDOW                     MAKE_DDHRESULT( 602 )
  5456.  
  5457. /*
  5458.  * Attempt was made to set a palette on a mipmap sublevel
  5459.  */
  5460. #define DDERR_NOTONMIPMAPSUBLEVEL               MAKE_DDHRESULT( 603 )
  5461.  
  5462. /*
  5463.  * A DC has already been returned for this surface. Only one DC can be
  5464.  * retrieved per surface.
  5465.  */
  5466. #define DDERR_DCALREADYCREATED                  MAKE_DDHRESULT( 620 )
  5467.  
  5468. /*
  5469.  * An attempt was made to allocate non-local video memory from a device
  5470.  * that does not support non-local video memory.
  5471.  */
  5472. #define DDERR_NONONLOCALVIDMEM                  MAKE_DDHRESULT( 630 )
  5473.  
  5474. /*
  5475.  * The attempt to page lock a surface failed.
  5476.  */
  5477. #define DDERR_CANTPAGELOCK                      MAKE_DDHRESULT( 640 )
  5478.  
  5479.  
  5480. /*
  5481.  * The attempt to page unlock a surface failed.
  5482.  */
  5483. #define DDERR_CANTPAGEUNLOCK                    MAKE_DDHRESULT( 660 )
  5484.  
  5485. /*
  5486.  * An attempt was made to page unlock a surface with no outstanding page locks.
  5487.  */
  5488. #define DDERR_NOTPAGELOCKED                     MAKE_DDHRESULT( 680 )
  5489.  
  5490. /*
  5491.  * There is more data available than the specified buffer size could hold
  5492.  */
  5493. #define DDERR_MOREDATA                          MAKE_DDHRESULT( 690 )
  5494.  
  5495. /*
  5496.  * The data has expired and is therefore no longer valid.
  5497.  */
  5498. #define DDERR_EXPIRED                           MAKE_DDHRESULT( 691 )
  5499.  
  5500. /*
  5501.  * The mode test has finished executing.
  5502.  */
  5503. #define DDERR_TESTFINISHED                      MAKE_DDHRESULT( 692 )
  5504.  
  5505. /*
  5506.  * The mode test has switched to a new mode.
  5507.  */
  5508. #define DDERR_NEWMODE                           MAKE_DDHRESULT( 693 )
  5509.  
  5510. /*
  5511.  * D3D has not yet been initialized.
  5512.  */
  5513. #define DDERR_D3DNOTINITIALIZED                 MAKE_DDHRESULT( 694 )
  5514.  
  5515. /*
  5516.  * The video port is not active
  5517.  */
  5518. #define DDERR_VIDEONOTACTIVE                    MAKE_DDHRESULT( 695 )
  5519.  
  5520. /*
  5521.  * The monitor does not have EDID data.
  5522.  */
  5523. #define DDERR_NOMONITORINFORMATION              MAKE_DDHRESULT( 696 )
  5524.  
  5525. /*
  5526.  * The driver does not enumerate display mode refresh rates.
  5527.  */
  5528. #define DDERR_NODRIVERSUPPORT                   MAKE_DDHRESULT( 697 )
  5529.  
  5530. /*
  5531.  * Surfaces created by one direct draw device cannot be used directly by
  5532.  * another direct draw device.
  5533.  */
  5534. #define DDERR_DEVICEDOESNTOWNSURFACE            MAKE_DDHRESULT( 699 )
  5535.  
  5536.  
  5537.  
  5538. /*
  5539.  * An attempt was made to invoke an interface member of a DirectDraw object
  5540.  * created by CoCreateInstance() before it was initialized.
  5541.  */
  5542. #define DDERR_NOTINITIALIZED                    CO_E_NOTINITIALIZED
  5543.  
  5544.  
  5545. /* Alpha bit depth constants */
  5546.  
  5547.  
  5548. #ifdef __cplusplus
  5549. };
  5550. #endif
  5551.  
  5552. #pragma warning(default:4201)
  5553.  
  5554. #endif //__DDRAW_INCLUDED__
  5555.  
  5556.